Qt/ToolBar: Fix checkbox and actual visibility not being in sync

This commit is contained in:
spycrab 2018-04-28 21:27:29 +02:00
parent 0cd46f4d21
commit dd6ac93ad0
2 changed files with 2 additions and 1 deletions

View File

@ -399,7 +399,7 @@ void Settings::SetToolBarVisible(bool visible)
bool Settings::IsToolBarVisible() const
{
return GetQSettings().value(QStringLiteral("toolbar/visible")).toBool();
return GetQSettings().value(QStringLiteral("toolbar/visible"), true).toBool();
}
void Settings::SetWidgetsLocked(bool locked)

View File

@ -21,6 +21,7 @@ ToolBar::ToolBar(QWidget* parent) : QToolBar(parent)
setMovable(!Settings::Instance().AreWidgetsLocked());
setFloatable(false);
setIconSize(ICON_SIZE);
setVisible(Settings::Instance().IsToolBarVisible());
setWindowTitle(tr("Toolbar"));
setObjectName(QStringLiteral("toolbar"));