From 3408c418acbd997d64a4c538afbd8635483f48a2 Mon Sep 17 00:00:00 2001 From: Tig Date: Tue, 8 Oct 2024 13:22:52 -0400 Subject: [PATCH] Fixed Theme bugs 2 --- Terminal.Gui/Configuration/ConfigurationManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Terminal.Gui/Configuration/ConfigurationManager.cs b/Terminal.Gui/Configuration/ConfigurationManager.cs index dacb87891..cd5befa16 100644 --- a/Terminal.Gui/Configuration/ConfigurationManager.cs +++ b/Terminal.Gui/Configuration/ConfigurationManager.cs @@ -199,14 +199,15 @@ public static class ConfigurationManager { if (string.IsNullOrEmpty (ThemeManager.SelectedTheme)) { + // First start. Apply settings first. This ensures if a config sets Theme to something other than "Default", it gets used settings = Settings?.Apply () ?? false; themes = !string.IsNullOrEmpty (ThemeManager.SelectedTheme) && (ThemeManager.Themes? [ThemeManager.SelectedTheme]?.Apply () ?? false); } else { - themes = !string.IsNullOrEmpty (ThemeManager.SelectedTheme) - && (ThemeManager.Themes? [ThemeManager.SelectedTheme]?.Apply () ?? false); + // Subsequently. Apply Themes first using whatever the SelectedTheme is + themes = ThemeManager.Themes? [ThemeManager.SelectedTheme]?.Apply () ?? false; settings = Settings?.Apply () ?? false; } appSettings = AppSettings?.Apply () ?? false;