From 600d3288a63771715a941167b6d497bdbf448131 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 1 Nov 2024 15:29:16 +0100 Subject: [PATCH] Core: Move the current default theme to top of chooser It worked for the light theme but not for the case where (caused by system settings), the dark theme would be the default. Change-Id: I4a88875262425017849c18f716c818e8a5881c96 Reviewed-by: hjk --- src/plugins/coreplugin/themechooser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/themechooser.cpp b/src/plugins/coreplugin/themechooser.cpp index be0d28a2868..2056bd8d06b 100644 --- a/src/plugins/coreplugin/themechooser.cpp +++ b/src/plugins/coreplugin/themechooser.cpp @@ -193,7 +193,8 @@ QList ThemeEntry::availableThemes() qWarning() << "Warning: No themes found in installation: " << installThemeDir.toUserOutput(); // move default theme to front - int defaultIndex = Utils::indexOf(themes, Utils::equal(&ThemeEntry::id, Id(Constants::DEFAULT_THEME))); + const int defaultIndex = Utils::indexOf(themes, Utils::equal(&ThemeEntry::id, + Id::fromString(defaultThemeId()))); if (defaultIndex > 0) { // == exists and not at front ThemeEntry defaultEntry = themes.takeAt(defaultIndex); themes.prepend(defaultEntry);