浏览代码

Fixed Theme bugs 2

Tig 9 月之前
父节点
当前提交
3408c418ac
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      Terminal.Gui/Configuration/ConfigurationManager.cs

+ 3 - 2
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;