mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-24 05:22:06 +08:00
swap position of auto hide button and detach group button
This commit is contained in:
parent
1a903e74f2
commit
4a77580b07
@ -164,6 +164,16 @@ void DockAreaTitleBarPrivate::createButtons()
|
|||||||
_this->connect(TabsMenuButton->menu(), SIGNAL(triggered(QAction*)),
|
_this->connect(TabsMenuButton->menu(), SIGNAL(triggered(QAction*)),
|
||||||
SLOT(onTabsMenuActionTriggered(QAction*)));
|
SLOT(onTabsMenuActionTriggered(QAction*)));
|
||||||
|
|
||||||
|
// Undock button
|
||||||
|
UndockButton = new CTitleBarButton(testConfigFlag(CDockManager::DockAreaHasUndockButton));
|
||||||
|
UndockButton->setObjectName("detachGroupButton");
|
||||||
|
UndockButton->setAutoRaise(true);
|
||||||
|
internal::setToolTip(UndockButton, QObject::tr("Detach Group"));
|
||||||
|
internal::setButtonIcon(UndockButton, QStyle::SP_TitleBarNormalButton, ads::DockAreaUndockIcon);
|
||||||
|
UndockButton->setSizePolicy(ButtonSizePolicy);
|
||||||
|
Layout->addWidget(UndockButton, 0);
|
||||||
|
_this->connect(UndockButton, SIGNAL(clicked()), SLOT(onUndockButtonClicked()));
|
||||||
|
|
||||||
// AutoHide Button
|
// AutoHide Button
|
||||||
const auto autoHideEnabled = testConfigFlag(CDockManager::DockContainerHasRightSideBar) || testConfigFlag(CDockManager::DockContainerHasLeftSideBar);
|
const auto autoHideEnabled = testConfigFlag(CDockManager::DockContainerHasRightSideBar) || testConfigFlag(CDockManager::DockContainerHasLeftSideBar);
|
||||||
AutoHideButton = new CTitleBarButton(testConfigFlag(CDockManager::DockAreaHasAutoHideButton) && autoHideEnabled);
|
AutoHideButton = new CTitleBarButton(testConfigFlag(CDockManager::DockAreaHasAutoHideButton) && autoHideEnabled);
|
||||||
@ -177,16 +187,6 @@ void DockAreaTitleBarPrivate::createButtons()
|
|||||||
Layout->addWidget(AutoHideButton, 0);
|
Layout->addWidget(AutoHideButton, 0);
|
||||||
_this->connect(AutoHideButton, SIGNAL(toggled(bool)), SLOT(onAutoHideButtonClicked(bool)));
|
_this->connect(AutoHideButton, SIGNAL(toggled(bool)), SLOT(onAutoHideButtonClicked(bool)));
|
||||||
|
|
||||||
// Undock button
|
|
||||||
UndockButton = new CTitleBarButton(testConfigFlag(CDockManager::DockAreaHasUndockButton));
|
|
||||||
UndockButton->setObjectName("detachGroupButton");
|
|
||||||
UndockButton->setAutoRaise(true);
|
|
||||||
internal::setToolTip(UndockButton, QObject::tr("Detach Group"));
|
|
||||||
internal::setButtonIcon(UndockButton, QStyle::SP_TitleBarNormalButton, ads::DockAreaUndockIcon);
|
|
||||||
UndockButton->setSizePolicy(ButtonSizePolicy);
|
|
||||||
Layout->addWidget(UndockButton, 0);
|
|
||||||
_this->connect(UndockButton, SIGNAL(clicked()), SLOT(onUndockButtonClicked()));
|
|
||||||
|
|
||||||
// Close button
|
// Close button
|
||||||
CloseButton = new CTitleBarButton(testConfigFlag(CDockManager::DockAreaHasCloseButton));
|
CloseButton = new CTitleBarButton(testConfigFlag(CDockManager::DockAreaHasCloseButton));
|
||||||
CloseButton->setObjectName("dockAreaCloseButton");
|
CloseButton->setObjectName("dockAreaCloseButton");
|
||||||
|
Loading…
Reference in New Issue
Block a user