Skip to content

Commit 2d7a9d8

Browse files
committed
Updates from review
1 parent a6f8d8c commit 2d7a9d8

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/cascadia/TerminalSettingsEditor/MainPage.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -699,21 +699,23 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
699699
}
700700
}
701701

702-
if (!isMicaAvailable)
703-
{
704-
return;
705-
}
706702
const auto& theme = _settingsSource.GlobalSettings().CurrentTheme();
707-
const auto& requestedTheme = (theme.Settings() != nullptr) ? theme.Settings().RequestedTheme() : theme.RequestedTheme();
703+
const bool hasThemeForSettings{ theme.Settings() != nullptr };
704+
const auto& appTheme = theme.RequestedTheme();
705+
const auto& requestedTheme = (hasThemeForSettings) ? theme.Settings().RequestedTheme() : appTheme;
708706

709707
RequestedTheme(requestedTheme);
710708

711-
if (!isMicaAvailable)
712-
{
713-
return;
714-
}
709+
// Mica gets it's appearance from the app's theme, not necessarily the
710+
// Page's theme. In the case of dark app, light settings, mica will be a
711+
// dark color, and the text will also be dark, making the UI _very_ hard
712+
// to read. (and similarly in the inverse situation).
713+
//
714+
// To mitigate this, don't set the transparent background in the case
715+
// that our theme is different than the app's.
716+
const bool actuallyUseMica = isMicaAvailable && (appTheme == requestedTheme);
715717

716-
const auto bgKey = (theme.Window() != nullptr && theme.Window().UseMica()) ?
718+
const auto bgKey = (theme.Window() != nullptr && theme.Window().UseMica()) && actuallyUseMica ?
717719
L"SettingsPageMicaBackground" :
718720
L"SettingsPageBackground";
719721

0 commit comments

Comments
 (0)