hide duplicate spaces in settings tab list

This commit is contained in:
fourtf 2019-09-02 17:21:17 +02:00
parent b0459ba646
commit a6fd6300c9

View file

@ -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>()