Qt/ToolBar: Fix checkbox and actual visibility not being in sync
This commit is contained in:
parent
0cd46f4d21
commit
dd6ac93ad0
|
@ -399,7 +399,7 @@ void Settings::SetToolBarVisible(bool visible)
|
||||||
|
|
||||||
bool Settings::IsToolBarVisible() const
|
bool Settings::IsToolBarVisible() const
|
||||||
{
|
{
|
||||||
return GetQSettings().value(QStringLiteral("toolbar/visible")).toBool();
|
return GetQSettings().value(QStringLiteral("toolbar/visible"), true).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::SetWidgetsLocked(bool locked)
|
void Settings::SetWidgetsLocked(bool locked)
|
||||||
|
|
|
@ -21,6 +21,7 @@ ToolBar::ToolBar(QWidget* parent) : QToolBar(parent)
|
||||||
setMovable(!Settings::Instance().AreWidgetsLocked());
|
setMovable(!Settings::Instance().AreWidgetsLocked());
|
||||||
setFloatable(false);
|
setFloatable(false);
|
||||||
setIconSize(ICON_SIZE);
|
setIconSize(ICON_SIZE);
|
||||||
|
setVisible(Settings::Instance().IsToolBarVisible());
|
||||||
|
|
||||||
setWindowTitle(tr("Toolbar"));
|
setWindowTitle(tr("Toolbar"));
|
||||||
setObjectName(QStringLiteral("toolbar"));
|
setObjectName(QStringLiteral("toolbar"));
|
||||||
|
|
Loading…
Reference in New Issue