Repository: microsoft/terminal (language: cpp)

Issue:
[1.17] Setting app theme results in mismatched light/dark colors for SUI text
Go to Appearance -> set theme to 'Light' 

Some settings have the header in black some have them in white (seems to be the different setting container styles) 
<img width="761" alt="GetImage (3)" src="https://user-images.githubusercontent.com/11050425/207741120-6d178b39-6d12-4161-838e-e72bacca916b.png">



Discussion / hints:
Hmm. I don't know if I can repro this exactly. 

What I _can_ repro is the SUI BG not matching the app theme. That I think regressed in #14567, which I can't remember if it made it to the bug bash or not. 

Does this happen on launch when the theme is set to "light"? Or do you need to switch from some other theme?

I'll submit the mica fix, and then you try that out and tell me if this is gone

Fix patch:
diff --git a/src/cascadia/TerminalSettingsEditor/MainPage.cpp b/src/cascadia/TerminalSettingsEditor/MainPage.cpp
index 6a074b858fd..b892261647c 100644
--- a/src/cascadia/TerminalSettingsEditor/MainPage.cpp
+++ b/src/cascadia/TerminalSettingsEditor/MainPage.cpp
@@ -17,6 +17,7 @@
 #include "InteractionViewModel.h"
 #include "LaunchViewModel.h"
 #include "..\types\inc\utils.hpp"
+#include <..\WinRTUtils\inc\Utils.h>
 
 #include <LibraryResources.h>
 
@@ -648,12 +649,17 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
 
     {
         const auto& theme = _settingsSource.GlobalSettings().CurrentTheme();
+        const auto& requestedTheme = _settingsSource.GlobalSettings().CurrentTheme().RequestedTheme();
+
+        RequestedTheme(requestedTheme);
 
         const auto bgKey = (theme.Window() != nullptr && theme.Window().UseMica()) ?
                                L"SettingsPageMicaBackground" :
                                L"SettingsPageBackground";
 
-        if (const auto bgColor = Resources().TryLookup(winrt::box_value(bgKey)))
+        // remember to use ThemeLookup to get the actual correct color for the
+        // currently requested theme.
+        if (const auto bgColor = ThemeLookup(Resources(), requestedTheme, winrt::box_value(bgKey)))
         {
             SettingsNav().Background(winrt::WUX::Media::SolidColorBrush(winrt::unbox_value<Windows::UI::Color>(bgColor)));
         }


Test patch: