diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 95bdd3fa0..8cdff237f 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -133,8 +133,6 @@ MainWindow::MainWindow() setAcceptDrops(true); - m_ui->toolBar->setContextMenuPolicy(Qt::PreventContextMenu); - // Setup the search widget in the toolbar SearchWidget* search = new SearchWidget(); search->connectSignals(m_actionMultiplexer); @@ -841,6 +839,8 @@ void MainWindow::applySettingsChanges() m_inactivityTimer->deactivate(); } + m_ui->toolBar->setHidden(config()->get("GUI/HideToolbar").toBool()); + updateTrayIcon(); } diff --git a/src/gui/MainWindow.ui b/src/gui/MainWindow.ui index 49c0a6f3b..b67e6ffd1 100644 --- a/src/gui/MainWindow.ui +++ b/src/gui/MainWindow.ui @@ -175,6 +175,14 @@ + + + 0 + 0 + 800 + 30 + + Qt::PreventContextMenu @@ -280,6 +288,9 @@ + + Qt::PreventContextMenu + false diff --git a/src/gui/SettingsWidget.cpp b/src/gui/SettingsWidget.cpp index be2f4cd44..b16356d8b 100644 --- a/src/gui/SettingsWidget.cpp +++ b/src/gui/SettingsWidget.cpp @@ -140,6 +140,7 @@ void SettingsWidget::loadSettings() } m_generalUi->detailsHideCheckBox->setChecked(config()->get("GUI/HideDetailsView").toBool()); + m_generalUi->toolbarHideCheckBox->setChecked(config()->get("GUI/HideToolbar").toBool()); m_generalUi->systrayShowCheckBox->setChecked(config()->get("GUI/ShowTrayIcon").toBool()); m_generalUi->systrayDarkIconCheckBox->setChecked(config()->get("GUI/DarkTrayIcon").toBool()); m_generalUi->systrayMinimizeToTrayCheckBox->setChecked(config()->get("GUI/MinimizeToTray").toBool()); @@ -209,6 +210,7 @@ void SettingsWidget::saveSettings() config()->set("GUI/Language", m_generalUi->languageComboBox->itemData(currentLangIndex).toString()); config()->set("GUI/HideDetailsView", m_generalUi->detailsHideCheckBox->isChecked()); + config()->set("GUI/HideToolbar", m_generalUi->toolbarHideCheckBox->isChecked()); config()->set("GUI/ShowTrayIcon", m_generalUi->systrayShowCheckBox->isChecked()); config()->set("GUI/DarkTrayIcon", m_generalUi->systrayDarkIconCheckBox->isChecked()); config()->set("GUI/MinimizeToTray", m_generalUi->systrayMinimizeToTrayCheckBox->isChecked()); diff --git a/src/gui/SettingsWidgetGeneral.ui b/src/gui/SettingsWidgetGeneral.ui index 5ed952f1f..d7535f6e5 100644 --- a/src/gui/SettingsWidgetGeneral.ui +++ b/src/gui/SettingsWidgetGeneral.ui @@ -7,7 +7,7 @@ 0 0 684 - 732 + 794 @@ -179,6 +179,13 @@ General + + + + Hide toolbar (icons) + + +