diff options
author | Kenneth Chew <kenneth.c0@protonmail.com> | 2022-04-15 18:25:37 -0400 |
---|---|---|
committer | Kenneth Chew <kenneth.c0@protonmail.com> | 2022-04-15 18:26:41 -0400 |
commit | 1303771b58a213a25faaa1a870c774fbb72e7513 (patch) | |
tree | 597bb563aeb820aba8d70fa5e041eae8f1d3ef81 /launcher/ui/pages/global | |
parent | f6605bc3f82df4a3f190bb9e1d935de295329b54 (diff) | |
download | PrismLauncher-1303771b58a213a25faaa1a870c774fbb72e7513.tar.gz PrismLauncher-1303771b58a213a25faaa1a870c774fbb72e7513.tar.bz2 PrismLauncher-1303771b58a213a25faaa1a870c774fbb72e7513.zip |
Add option to always show menu bar instead of toolbar
For those who like keyboard navigation at the expense of aesthetics.
Diffstat (limited to 'launcher/ui/pages/global')
-rw-r--r-- | launcher/ui/pages/global/LauncherPage.cpp | 7 | ||||
-rw-r--r-- | launcher/ui/pages/global/LauncherPage.ui | 34 |
2 files changed, 35 insertions, 6 deletions
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp index 42ad5ae3..a213eff0 100644 --- a/launcher/ui/pages/global/LauncherPage.cpp +++ b/launcher/ui/pages/global/LauncherPage.cpp @@ -41,6 +41,7 @@ #include <QMessageBox> #include <QDir> #include <QTextCharFormat> +#include <QMenuBar> #include "updater/UpdateChecker.h" @@ -322,6 +323,8 @@ void LauncherPage::applySettings() APPLICATION->setApplicationTheme(newAppTheme, false); } + s->set("MenuBarInsteadOfToolBar", ui->preferMenuBarCheckBox->isChecked()); + // Console settings s->set("ShowConsole", ui->showConsoleCheck->isChecked()); s->set("AutoCloseConsole", ui->autoCloseConsoleCheck->isChecked()); @@ -410,6 +413,10 @@ void LauncherPage::loadSettings() } } + // Toolbar/menu bar settings (not applicable if native menu bar is present) + ui->toolsBox->setVisible(!QMenuBar().isNativeMenuBar()); + ui->preferMenuBarCheckBox->setChecked(s->get("MenuBarInsteadOfToolBar").toBool()); + // Console settings ui->showConsoleCheck->setChecked(s->get("ShowConsole").toBool()); ui->autoCloseConsoleCheck->setChecked(s->get("AutoCloseConsole").toBool()); diff --git a/launcher/ui/pages/global/LauncherPage.ui b/launcher/ui/pages/global/LauncherPage.ui index c110dd09..636aec15 100644 --- a/launcher/ui/pages/global/LauncherPage.ui +++ b/launcher/ui/pages/global/LauncherPage.ui @@ -290,6 +290,16 @@ </item> </widget> </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string>Colors</string> + </property> + <property name="buddy"> + <cstring>themeComboBoxColors</cstring> + </property> + </widget> + </item> <item row="1" column="1"> <widget class="QComboBox" name="themeComboBoxColors"> <property name="sizePolicy"> @@ -303,13 +313,25 @@ </property> </widget> </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_4"> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="toolsBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Tools</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QCheckBox" name="preferMenuBarCheckBox"> <property name="text"> - <string>Colors</string> - </property> - <property name="buddy"> - <cstring>themeComboBoxColors</cstring> + <string>Always show menu bar instead of tool bar (more keyboard friendly, less pretty)</string> </property> </widget> </item> |