diff options
author | Redson <redson@riseup.net> | 2022-11-15 05:38:31 -0300 |
---|---|---|
committer | Redson <redson@riseup.net> | 2022-11-15 05:38:31 -0300 |
commit | aa3ea79f94887aedc91c52860d5a7b6557900a6f (patch) | |
tree | a26ad50e82536e423dcb5a0d74488a9afa7b669b /launcher | |
parent | ef53455b6610844a633624fa172b7bf80310651c (diff) | |
download | PrismLauncher-aa3ea79f94887aedc91c52860d5a7b6557900a6f.tar.gz PrismLauncher-aa3ea79f94887aedc91c52860d5a7b6557900a6f.tar.bz2 PrismLauncher-aa3ea79f94887aedc91c52860d5a7b6557900a6f.zip |
fix: Check the current theme box on startup.
Signed-off-by: Redson <redson@riseup.net>
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/ui/MainWindow.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index a00fb402..f8a37596 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -1305,12 +1305,9 @@ void MainWindow::updateThemeMenu() { QMenu *themeMenu = ui->actionChangeTheme->menu(); - if (themeMenu) - { + if (themeMenu) { themeMenu->clear(); - } - else - { + } else { themeMenu = new QMenu(this); } @@ -1320,11 +1317,13 @@ void MainWindow::updateThemeMenu() for (int i = 0; i < themes.size(); i++) { - auto *theme = themes[i]; QAction * themeAction = themeMenu->addAction(theme->name()); themeAction->setCheckable(true); + if (APPLICATION->settings()->get("ApplicationTheme").toString() == theme->id()) { + themeAction->setChecked(true); + } themeAction->setActionGroup(ThemesGroup); connect(themeAction, &QAction::triggered, [theme]() { |