From e98fb56f8d797f9d04f95fa4e8063c13632162ef Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 6 Apr 2024 18:36:35 +0800 Subject: [PATCH] - fix: Theme manager not correctly inited in options dialog / environment / appearance. --- NEWS.md | 1 + RedPandaIDE/settingsdialog/environmentappearancewidget.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index b4e98dba..15ce654f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -124,6 +124,7 @@ Red Panda C++ Version 2.27 - fix: Compiler set options "Check for stack smashing attacks (-fstack-protector)" was not correctly applied when compiling. - fix: can't jump to definition/declaration for symbols in using alias statement like "using ::printf". - fix: Don't show completion suggestion for members of variable which type name has namespace alias; + - fix: Theme manager not correctly inited in options dialog / environment / appearance. Red Panda C++ Version 2.26 - enhancement: Code suggestion for embedded std::vectors. diff --git a/RedPandaIDE/settingsdialog/environmentappearancewidget.cpp b/RedPandaIDE/settingsdialog/environmentappearancewidget.cpp index d48471cb..6cafdc02 100644 --- a/RedPandaIDE/settingsdialog/environmentappearancewidget.cpp +++ b/RedPandaIDE/settingsdialog/environmentappearancewidget.cpp @@ -68,6 +68,7 @@ void EnvironmentAppearanceWidget::doSave() { if (pSettings->environment().theme()!=ui->cbTheme->currentData().toString()) { ThemeManager themeManager; + themeManager.setUseCustomTheme(pSettings->environment().useCustomTheme()); PAppTheme appTheme = themeManager.theme(ui->cbTheme->currentData().toString()); if (appTheme && !appTheme->defaultColorScheme().isEmpty()) { pSettings->editor().setColorScheme(appTheme->defaultColorScheme()); @@ -93,6 +94,7 @@ void EnvironmentAppearanceWidget::doSave() void EnvironmentAppearanceWidget::init() { ThemeManager themeManager; + themeManager.setUseCustomTheme(pSettings->environment().useCustomTheme()); QList appThemes = themeManager.getThemes(); foreach(const PAppTheme& appTheme, appThemes) { ui->cbTheme->addItem(appTheme->displayName(),appTheme->name()); @@ -111,6 +113,7 @@ void EnvironmentAppearanceWidget::init() void EnvironmentAppearanceWidget::on_cbTheme_currentIndexChanged(int /* index */) { ThemeManager themeManager; + themeManager.setUseCustomTheme(pSettings->environment().useCustomTheme()); PAppTheme appTheme = themeManager.theme(ui->cbTheme->currentData().toString()); if (appTheme && !appTheme->defaultIconSet().isEmpty()) { for (int i=0; icbIconSet->count();i++) {