diff --git a/src/Calculator/App.xaml.cpp b/src/Calculator/App.xaml.cpp index 27075669..d7ef2824 100644 --- a/src/Calculator/App.xaml.cpp +++ b/src/Calculator/App.xaml.cpp @@ -70,21 +70,26 @@ App::App() this->HighContrastAdjustment = ApplicationHighContrastAdjustment::None; this->Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending); + + Windows::Storage::ApplicationData::Current->LocalSettings->Values->Insert(L"restartApp", nullptr); + auto value = Windows::Storage::ApplicationData::Current->LocalSettings->Values->Lookup(L"themeSetting"); auto DefaultTheme = ref new Windows::UI::ViewManagement::UISettings(); auto uiTheme = DefaultTheme->GetColorValue(Windows::UI::ViewManagement::UIColorType::Background).ToString(); + if (value != nullptr) { String ^ colorSetting = safe_cast(value); + // Apply theme choice. - if (colorSetting == L"Dark") - { - App::Current->RequestedTheme = ApplicationTheme::Dark; - } - else if (colorSetting == L"Light") + if (colorSetting == L"Light") { App::Current->RequestedTheme = ApplicationTheme::Light; } + else if (colorSetting == L"Dark") + { + App::Current->RequestedTheme = ApplicationTheme::Dark; + } else if (colorSetting == L"System") { if (uiTheme == "#FF000000") @@ -98,6 +103,7 @@ App::App() } } + #if _DEBUG this->DebugSettings->IsBindingTracingEnabled = true; this->DebugSettings->BindingFailed += ref new BindingFailedEventHandler([](_In_ Object ^ /*sender*/, _In_ BindingFailedEventArgs ^ e) { diff --git a/src/Calculator/Resources/en-US/Resources.resw b/src/Calculator/Resources/en-US/Resources.resw index db363621..4da94814 100644 --- a/src/Calculator/Resources/en-US/Resources.resw +++ b/src/Calculator/Resources/en-US/Resources.resw @@ -4735,7 +4735,7 @@ Text for the "Settings" header - To learn how you can contribute to Windows Calculator, visit the project on %HL%GitHub%HL%. - {Locked="%HL%GitHub%HL%"} + To learn how you can contribute to Windows Calculator, visit the project on%HL%GitHub%HL%. + {Locked="%HL%GitHub%HL%"}. GitHub link, displayed on the settings page. \ No newline at end of file diff --git a/src/Calculator/SettingsPage.xaml b/src/Calculator/SettingsPage.xaml index 2206b4de..70441d3f 100644 --- a/src/Calculator/SettingsPage.xaml +++ b/src/Calculator/SettingsPage.xaml @@ -1,7 +1,6 @@ + MinHeight="{StaticResource HamburgerHeight}" + MaxHeight="52"/> + HorizontalAlignment="Left" + VerticalAlignment="Top">