mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
@@ -124,6 +124,17 @@ namespace BlackGui
|
||||
menu->addAction(showMenuText);
|
||||
connect(showMenuText, &QAction::toggled, this, &CMainInfoAreaComponent::ps_showTabTexts);
|
||||
|
||||
// auto adjust floating widgets
|
||||
QAction *autoAdjustFloatingWidget = new QAction(menu);
|
||||
autoAdjustFloatingWidget->setObjectName("AutoAdjustFloatingWidgets");
|
||||
autoAdjustFloatingWidget->setIconText("Auto adjust floating widgets");
|
||||
autoAdjustFloatingWidget->setIcon(CIcons::resize16());
|
||||
autoAdjustFloatingWidget->setCheckable(true);
|
||||
autoAdjustFloatingWidget->setChecked(this->m_autoAdjustFloatingWidgets);
|
||||
menu->addAction(autoAdjustFloatingWidget);
|
||||
connect(autoAdjustFloatingWidget, &QAction::toggled, this, &CMainInfoAreaComponent::ps_toggleAutoAdjustFloatingWidget);
|
||||
|
||||
// tab bar position
|
||||
menu->addAction(CIcons::dockBottom16(), "Toogle tabbar position", this, SLOT(ps_toggleTabBarPosition()));
|
||||
}
|
||||
}
|
||||
@@ -506,6 +517,18 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CMainInfoAreaComponent::ps_toggleAutoAdjustFloatingWidget(bool adjust)
|
||||
{
|
||||
if (adjust == this->m_autoAdjustFloatingWidgets) return;
|
||||
this->m_autoAdjustFloatingWidgets = adjust;
|
||||
QList<CDockWidgetInfoArea *>::iterator i;
|
||||
for (i = this->m_dockableWidgets.begin(); i != this->m_dockableWidgets.end(); ++i)
|
||||
{
|
||||
CDockWidgetInfoArea *dw = (*i);
|
||||
dw->setAutoAdjustWhenFloating(adjust);
|
||||
}
|
||||
}
|
||||
|
||||
void CMainInfoAreaComponent::ps_setTabBarPosition(QTabWidget::TabPosition position)
|
||||
{
|
||||
Q_ASSERT(position == QTabWidget::North || position == QTabWidget::South);
|
||||
|
||||
Reference in New Issue
Block a user