mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-27 00:11:33 +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);
|
setOrientation((area == Bottom || area == Top) ? Qt::Horizontal : Qt::Vertical);
|
||||||
|
|
||||||
/*if (CDockManager::testConfigFlag(CDockManager::LeftSideBarPrioritizeIconOnly) && area == Left)
|
if (icon().isNull())
|
||||||
{
|
{
|
||||||
d->TitleLabel->hide();
|
return;
|
||||||
d->TitleLayout->setContentsMargins(0, 0, 0, 0);
|
}
|
||||||
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing / 2, Spacing / 2);
|
|
||||||
|
if (CDockManager::testConfigFlag(CDockManager::LeftSideBarPrioritizeIconOnly) && area == Left)
|
||||||
|
{
|
||||||
|
setText("");
|
||||||
|
setOrientation(Qt::Horizontal);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (CDockManager::testConfigFlag(CDockManager::RightSideBarPrioritizeIconOnly) && area == Right)
|
if (CDockManager::testConfigFlag(CDockManager::RightSideBarPrioritizeIconOnly) && area == Right)
|
||||||
{
|
{
|
||||||
d->TitleLabel->hide();
|
setText("");
|
||||||
d->TitleLayout->setContentsMargins(0, 0, 0, 0);
|
setOrientation(Qt::Horizontal);
|
||||||
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing, Spacing / 2);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (CDockManager::testConfigFlag(CDockManager::BottomSideBarPrioritizeIconOnly) && area == Bottom)
|
if (CDockManager::testConfigFlag(CDockManager::BottomSideBarPrioritizeIconOnly) && area == Bottom)
|
||||||
{
|
{
|
||||||
d->TitleLabel->hide();
|
setText("");
|
||||||
d->TitleLayout->setContentsMargins(0, 0, 0, 0);
|
setOrientation(Qt::Horizontal);
|
||||||
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing / 2, Spacing);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (CDockManager::testConfigFlag(CDockManager::TopSideBarPrioritizeIconOnly) && area == Top)
|
if (CDockManager::testConfigFlag(CDockManager::TopSideBarPrioritizeIconOnly) && area == Top)
|
||||||
{
|
{
|
||||||
d->TitleLabel->hide();
|
setText("");
|
||||||
d->TitleLayout->setContentsMargins(0, 0, 0, 0);
|
setOrientation(Qt::Horizontal);
|
||||||
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing / 2, Spacing / 2);
|
|
||||||
return;
|
return;
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user