mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
hide duplicate spaces in settings tab list
This commit is contained in:
parent
b0459ba646
commit
a6fd6300c9
1 changed files with 18 additions and 0 deletions
|
@ -91,6 +91,24 @@ void SettingsDialog::initUi()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// remove duplicate spaces
|
||||
bool shouldShowSpace = true;
|
||||
|
||||
for (int i = 0; i < this->ui_.tabContainer->count(); i++)
|
||||
{
|
||||
auto item = this->ui_.tabContainer->itemAt(i);
|
||||
if (auto x = dynamic_cast<QSpacerItem *>(item); x)
|
||||
{
|
||||
x->changeSize(
|
||||
10, shouldShowSpace ? int(16 * this->scale()) : 0);
|
||||
shouldShowSpace = false;
|
||||
}
|
||||
else if (item->widget())
|
||||
{
|
||||
shouldShowSpace |= item->widget()->isVisible();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
right.emplace<QStackedLayout>()
|
||||
|
|
Loading…
Reference in a new issue