mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
refs #299, dockable widgets improvements
* preferred size instead of a auto adjustment for floatable widgets * hack for hiding the tabbar (it still cosnumes space)
This commit is contained in:
@@ -119,9 +119,15 @@ namespace BlackGui
|
||||
}
|
||||
this->setNullTitleBar();
|
||||
this->setContentsMargins(this->m_marginsWhenFloating);
|
||||
if (this->m_autoAdjustWhenFloating) {
|
||||
this->adjustSize();
|
||||
if (!this->m_wasAlreadyFloating)
|
||||
{
|
||||
// for the first time resize
|
||||
if (!this->m_preferredSizeWhenFloating.isNull())
|
||||
{
|
||||
this->resize(this->m_preferredSizeWhenFloating);
|
||||
}
|
||||
}
|
||||
this->m_wasAlreadyFloating = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -143,6 +149,20 @@ namespace BlackGui
|
||||
this->setTitleBarWidget(this->m_emptyTitleBar);
|
||||
}
|
||||
|
||||
QList<QWidget *> CDockWidget::findEmbeddedRuntimeComponents() const
|
||||
{
|
||||
QList<QWidget *> widgets = this->findChildren<QWidget *>();
|
||||
QList<QWidget *> widgetsWithRuntimeComponent;
|
||||
foreach(QWidget * w, widgets)
|
||||
{
|
||||
if (dynamic_cast<Components::CRuntimeBasedComponent *>(w))
|
||||
{
|
||||
widgetsWithRuntimeComponent.append(w);
|
||||
}
|
||||
}
|
||||
return widgetsWithRuntimeComponent;
|
||||
}
|
||||
|
||||
void CDockWidget::ps_showContextMenu(const QPoint &pos)
|
||||
{
|
||||
QPoint globalPos = this->mapToGlobal(pos);
|
||||
|
||||
Reference in New Issue
Block a user