Add bottom side icon config

This commit is contained in:
Syarif Fakhri 2022-09-13 14:16:12 +08:00
parent 9a69955124
commit 263c73188a
2 changed files with 8 additions and 1 deletions

View File

@ -232,7 +232,7 @@ public:
DockAreaHasAutoHideButton = 0x08, //!< If the flag is set each dock area has a auto hide menu button
LeftSideBarPrioritizeIconOnly = 0x10, //!< If the flag is set each container will have a left side bar
RightSideBarPrioritizeIconOnly = 0x20, //!< If the flag is set each container will have a right side bar
BottomSideBarPrioritizeIconOnly = 0x40, //!< If the flag is set right side bar will prioritize showing icons only over text
BottomSideBarPrioritizeIconOnly = 0x40, //!< If the flag is set bottom side bar will prioritize showing icons only over text
DockAreaOverlayHasTitle = 0x80, //!< If the flag is set overlay dock area title bar will show the window title
DefaultAutoHideConfig = DockContainerHasLeftSideBar

View File

@ -304,6 +304,13 @@ void CDockWidgetSideTab::updateOrientationAndSpacing(SideTabBarArea area)
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing, Spacing / 2);
return;
}
if (CDockManager::testConfigFlag(CDockManager::BottomSideBarPrioritizeIconOnly) && area == Bottom)
{
d->TitleLabel->hide();
d->TitleLayout->setContentsMargins(0, 0, 0, 0);
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing / 2, Spacing / 2);
return;
}
d->TitleLabel->show();
}