aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRedson <redson@riseup.net>2022-11-15 05:38:31 -0300
committerRedson <redson@riseup.net>2022-11-15 05:38:31 -0300
commitaa3ea79f94887aedc91c52860d5a7b6557900a6f (patch)
treea26ad50e82536e423dcb5a0d74488a9afa7b669b
parentef53455b6610844a633624fa172b7bf80310651c (diff)
downloadPrismLauncher-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>
-rw-r--r--launcher/ui/MainWindow.cpp11
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]() {