[PT Settings] Opening windows color settings from inside PT (#9589)

This commit is contained in:
Seraphima Zykova
2021-02-09 14:11:51 +03:00
committed by GitHub
parent 6213e0a116
commit 21abb6fd09
8 changed files with 37 additions and 3 deletions

View File

@@ -106,7 +106,7 @@
<RadioButton x:Uid="Radio_Theme_Default"
IsChecked="{ Binding Mode=TwoWay, Path=IsSystemThemeRadioButtonChecked}"/>
<HyperlinkButton NavigateUri="ms-settings:colors">
<HyperlinkButton Click="OpenColorsSettings_Click">
<TextBlock x:Uid="Windows_Color_Settings" />
</HyperlinkButton>
</StackPanel>

View File

@@ -117,5 +117,10 @@ namespace Microsoft.PowerToys.Settings.UI.Views
return 0;
}
private void OpenColorsSettings_Click(object sender, RoutedEventArgs e)
{
Helpers.StartProcessHelper.Start(Helpers.StartProcessHelper.ColorsSettings);
}
}
}

View File

@@ -172,7 +172,7 @@
<RadioButton x:Uid="Radio_Theme_Default"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
IsChecked="{Binding Mode=TwoWay, Path=IsSystemThemeRadioButtonChecked}" />
<HyperlinkButton NavigateUri="ms-settings:colors">
<HyperlinkButton Click="OpenColorsSettings_Click">
<TextBlock x:Uid="Windows_Color_Settings" />
</HyperlinkButton>
</StackPanel>

View File

@@ -38,6 +38,11 @@ namespace Microsoft.PowerToys.Settings.UI.Views
searchTypePreferencesOptions.Add(Tuple.Create(loader.GetString("PowerLauncher_SearchTypePreference_ExecutableName"), "executable_name"));
}
private void OpenColorsSettings_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
{
Helpers.StartProcessHelper.Start(Helpers.StartProcessHelper.ColorsSettings);
}
/*
public Tuple<string, string> SelectedSearchResultPreference
{

View File

@@ -107,7 +107,7 @@
<RadioButton x:Uid="Radio_Theme_Light" />
<RadioButton x:Uid="Radio_Theme_Default"/>
</muxc:RadioButtons>
<HyperlinkButton NavigateUri="ms-settings:colors">
<HyperlinkButton Click="OpenColorsSettings_Click">
<TextBlock x:Uid="Windows_Color_Settings" />
</HyperlinkButton>
</StackPanel>

View File

@@ -21,5 +21,10 @@ namespace Microsoft.PowerToys.Settings.UI.Views
ViewModel = new ShortcutGuideViewModel(SettingsRepository<GeneralSettings>.GetInstance(settingsUtils), SettingsRepository<ShortcutGuideSettings>.GetInstance(settingsUtils), ShellPage.SendDefaultIPCMessage);
DataContext = ViewModel;
}
private void OpenColorsSettings_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
{
Helpers.StartProcessHelper.Start(Helpers.StartProcessHelper.ColorsSettings);
}
}
}