Update design

This commit is contained in:
Eric Tian 2020-09-27 20:00:21 -07:00
commit b34756d794
2 changed files with 19 additions and 22 deletions

View file

@ -27,20 +27,19 @@
<TextBlock x:Name="SettingsAppTheme"
x:Uid="SettingsAppTheme"
Style="{StaticResource SubtitleTextBlockStyle}"
FontWeight="SemiBold"
AutomationProperties.HeadingLevel="Level1"
TextTrimming="Clip"/>
<RadioButton x:Name="SettingsDarkTheme"
x:Uid="SettingsDarkTheme"
Grid.Row="2"
Checked="DarkChecked"/>
<RadioButton x:Name="SettingsLightTheme"
x:Uid="SettingsLightTheme"
Grid.Row="3"
Checked="LightChecked"/>
<RadioButton x:Name="SettingsDarkTheme"
x:Uid="SettingsDarkTheme"
Grid.Row="2"
Checked="DarkChecked"/>
<RadioButton x:Name="SettingsSystemTheme"
x:Uid="SettingsSystemTheme"
Grid.Row="4"
@ -67,7 +66,6 @@
<TextBlock x:Name="SettingsAboutLabel"
x:Uid="SettingsAboutLabel"
Style="{StaticResource SubtitleTextBlockStyle}"
FontWeight="SemiBold"
AutomationProperties.HeadingLevel="Level2"
TextTrimming="Clip"/>

View file

@ -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"));
}
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)
{
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());
}
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)
{
if (colorSetting == "System")