mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 22:23:29 -07:00
Update design
This commit is contained in:
parent
1b388ea12d
commit
b34756d794
2 changed files with 19 additions and 22 deletions
|
@ -27,20 +27,19 @@
|
||||||
<TextBlock x:Name="SettingsAppTheme"
|
<TextBlock x:Name="SettingsAppTheme"
|
||||||
x:Uid="SettingsAppTheme"
|
x:Uid="SettingsAppTheme"
|
||||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||||
FontWeight="SemiBold"
|
|
||||||
AutomationProperties.HeadingLevel="Level1"
|
AutomationProperties.HeadingLevel="Level1"
|
||||||
TextTrimming="Clip"/>
|
TextTrimming="Clip"/>
|
||||||
|
|
||||||
<RadioButton x:Name="SettingsDarkTheme"
|
|
||||||
x:Uid="SettingsDarkTheme"
|
|
||||||
Grid.Row="2"
|
|
||||||
Checked="DarkChecked"/>
|
|
||||||
|
|
||||||
<RadioButton x:Name="SettingsLightTheme"
|
<RadioButton x:Name="SettingsLightTheme"
|
||||||
x:Uid="SettingsLightTheme"
|
x:Uid="SettingsLightTheme"
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Checked="LightChecked"/>
|
Checked="LightChecked"/>
|
||||||
|
|
||||||
|
<RadioButton x:Name="SettingsDarkTheme"
|
||||||
|
x:Uid="SettingsDarkTheme"
|
||||||
|
Grid.Row="2"
|
||||||
|
Checked="DarkChecked"/>
|
||||||
|
|
||||||
<RadioButton x:Name="SettingsSystemTheme"
|
<RadioButton x:Name="SettingsSystemTheme"
|
||||||
x:Uid="SettingsSystemTheme"
|
x:Uid="SettingsSystemTheme"
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
|
@ -67,7 +66,6 @@
|
||||||
<TextBlock x:Name="SettingsAboutLabel"
|
<TextBlock x:Name="SettingsAboutLabel"
|
||||||
x:Uid="SettingsAboutLabel"
|
x:Uid="SettingsAboutLabel"
|
||||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||||
FontWeight="SemiBold"
|
|
||||||
AutomationProperties.HeadingLevel="Level2"
|
AutomationProperties.HeadingLevel="Level2"
|
||||||
TextTrimming="Clip"/>
|
TextTrimming="Clip"/>
|
||||||
|
|
||||||
|
|
|
@ -91,21 +91,6 @@ void SettingsPage::SettingsFeedbackButtonClick(_In_ Object ^ sender, _In_ Routed
|
||||||
Launcher::LaunchUriAsync(ref new Uri("windows-feedback:?contextid=130&metadata=%7B%22Metadata%22:[%7B%22AppBuild%22:%22" + versionNumber + "%22%7D]%7D"));
|
Launcher::LaunchUriAsync(ref new Uri("windows-feedback:?contextid=130&metadata=%7B%22Metadata%22:[%7B%22AppBuild%22:%22" + versionNumber + "%22%7D]%7D"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsPage::DarkChecked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e)
|
|
||||||
{
|
|
||||||
if (colorSetting == "Dark")
|
|
||||||
{
|
|
||||||
SettingsRestartApp->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SettingsRestartApp->Visibility = Windows::UI::Xaml::Visibility::Visible;
|
|
||||||
SettingsRestartApp->Text = resourceLoader->GetResourceString("SettingsRestartNotice");
|
|
||||||
}
|
|
||||||
Windows::Storage::ApplicationData::Current->LocalSettings->Values->Insert(L"themeSetting", ApplicationTheme::Dark.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void SettingsPage::LightChecked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e)
|
void SettingsPage::LightChecked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e)
|
||||||
{
|
{
|
||||||
if (colorSetting == "Light")
|
if (colorSetting == "Light")
|
||||||
|
@ -120,6 +105,20 @@ void SettingsPage::LightChecked(Platform::Object ^ sender, Windows::UI::Xaml::Ro
|
||||||
Windows::Storage::ApplicationData::Current->LocalSettings->Values->Insert(L"themeSetting", ApplicationTheme::Light.ToString());
|
Windows::Storage::ApplicationData::Current->LocalSettings->Values->Insert(L"themeSetting", ApplicationTheme::Light.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsPage::DarkChecked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e)
|
||||||
|
{
|
||||||
|
if (colorSetting == "Dark")
|
||||||
|
{
|
||||||
|
SettingsRestartApp->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SettingsRestartApp->Visibility = Windows::UI::Xaml::Visibility::Visible;
|
||||||
|
SettingsRestartApp->Text = resourceLoader->GetResourceString("SettingsRestartNotice");
|
||||||
|
}
|
||||||
|
Windows::Storage::ApplicationData::Current->LocalSettings->Values->Insert(L"themeSetting", ApplicationTheme::Dark.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
void SettingsPage::SystemChecked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e)
|
void SettingsPage::SystemChecked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e)
|
||||||
{
|
{
|
||||||
if (colorSetting == "System")
|
if (colorSetting == "System")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue