@@ -55,7 +55,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
55
55
_settingsClone{ settings.Copy () }
56
56
{
57
57
InitializeComponent ();
58
-
58
+ _UpdateBackgroundForMica ();
59
59
_InitializeProfilesList ();
60
60
61
61
_colorSchemesPageVM = winrt::make<ColorSchemesPageViewModel>(_settingsClone);
@@ -102,6 +102,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
102
102
_settingsSource = settings;
103
103
_settingsClone = settings.Copy ();
104
104
105
+ _UpdateBackgroundForMica ();
106
+
105
107
// Deduce information about the currently selected item
106
108
IInspectable lastBreadcrumb;
107
109
const auto size = _breadcrumbs.Size ();
@@ -640,4 +642,21 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
640
642
return SettingsNav ().Background ();
641
643
}
642
644
645
+ // If the theme asks for Mica, then drop out our background, so that we
646
+ // can have mica too.
647
+ void MainPage::_UpdateBackgroundForMica ()
648
+
649
+ {
650
+ const auto & theme = _settingsSource.GlobalSettings ().CurrentTheme ();
651
+
652
+ const auto bgKey = (theme.Window () != nullptr && theme.Window ().UseMica ()) ?
653
+ L" SettingsPageMicaBackground" :
654
+ L" SettingsPageBackground" ;
655
+
656
+ if (const auto bgColor = Resources ().TryLookup (winrt::box_value (bgKey)))
657
+ {
658
+ SettingsNav ().Background (winrt::WUX::Media::SolidColorBrush (winrt::unbox_value<Windows::UI::Color>(bgColor)));
659
+ }
660
+ }
661
+
643
662
}
0 commit comments