mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-26 08:01:32 +08:00
fix icon only config for side tab bars
This commit is contained in:
parent
7ed3f8b2d1
commit
9eb9ee4071
@ -141,34 +141,35 @@ void CDockWidgetSideTab::updateOrientationAndSpacing(SideTabBarArea area)
|
||||
{
|
||||
setOrientation((area == Bottom || area == Top) ? Qt::Horizontal : Qt::Vertical);
|
||||
|
||||
/*if (CDockManager::testConfigFlag(CDockManager::LeftSideBarPrioritizeIconOnly) && area == Left)
|
||||
if (icon().isNull())
|
||||
{
|
||||
d->TitleLabel->hide();
|
||||
d->TitleLayout->setContentsMargins(0, 0, 0, 0);
|
||||
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing / 2, Spacing / 2);
|
||||
return;
|
||||
}
|
||||
|
||||
if (CDockManager::testConfigFlag(CDockManager::LeftSideBarPrioritizeIconOnly) && area == Left)
|
||||
{
|
||||
setText("");
|
||||
setOrientation(Qt::Horizontal);
|
||||
return;
|
||||
}
|
||||
if (CDockManager::testConfigFlag(CDockManager::RightSideBarPrioritizeIconOnly) && area == Right)
|
||||
{
|
||||
d->TitleLabel->hide();
|
||||
d->TitleLayout->setContentsMargins(0, 0, 0, 0);
|
||||
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing, Spacing / 2);
|
||||
setText("");
|
||||
setOrientation(Qt::Horizontal);
|
||||
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);
|
||||
setText("");
|
||||
setOrientation(Qt::Horizontal);
|
||||
return;
|
||||
}
|
||||
if (CDockManager::testConfigFlag(CDockManager::TopSideBarPrioritizeIconOnly) && area == Top)
|
||||
{
|
||||
d->TitleLabel->hide();
|
||||
d->TitleLayout->setContentsMargins(0, 0, 0, 0);
|
||||
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing / 2, Spacing / 2);
|
||||
setText("");
|
||||
setOrientation(Qt::Horizontal);
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user