From d843ad414a6a0ab26c27c5d37f883d7efdcccbae Mon Sep 17 00:00:00 2001 From: Vladimir Svyatski Date: Mon, 9 Apr 2018 22:06:48 +0300 Subject: [PATCH] Use the "Hide toolbar" setting --- src/gui/MainWindow.cpp | 2 +- src/gui/MainWindow.ui | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 95bdd3fa0..8f7caa7c3 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -133,7 +133,7 @@ MainWindow::MainWindow() setAcceptDrops(true); - m_ui->toolBar->setContextMenuPolicy(Qt::PreventContextMenu); + m_ui->toolBar->setHidden(config()->get("GUI/HideToolbar").toBool()); // Setup the search widget in the toolbar SearchWidget* search = new SearchWidget(); 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