From a84be2ba60263e69d9ec0620e4701ff80b82005c Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Fri, 27 Mar 2020 16:58:53 +0100 Subject: [PATCH] New settings pages (XAML) and improvements to ShellPage. Added more styles for typical margins and textblocks (#1735) --- .../Microsoft.PowerToys.Settings.UI.csproj | 24 ++++ .../Strings/en-us/Resources.resw | 24 ++-- .../Styles/TextBlock.xaml | 5 + .../Styles/_Thickness.xaml | 5 +- .../ViewModels/PowerLauncherViewModel.cs | 13 +++ .../ViewModels/PowerRenameViewModel.cs | 13 +++ .../ViewModels/ShortcutGuideViewModel.cs | 12 ++ .../Views/GeneralPage.xaml | 15 +-- .../Views/GeneralPage.xaml.cs | 6 +- .../Views/PowerLauncherPage.xaml | 91 +++++++++++++++ .../Views/PowerLauncherPage.xaml.cs | 28 +++++ .../Views/PowerRenamePage.xaml | 51 +++++++++ .../Views/PowerRenamePage.xaml.cs | 28 +++++ .../Views/ShellPage.xaml | 107 +++++++++++++++--- .../Views/ShortcutGuidePage.xaml | 45 ++++++++ .../Views/ShortcutGuidePage.xaml.cs | 28 +++++ .../app/Window Walker/Window Walker.csproj | 2 +- 17 files changed, 456 insertions(+), 41 deletions(-) create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/ViewModels/PowerLauncherViewModel.cs create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/ViewModels/PowerRenameViewModel.cs create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/ViewModels/ShortcutGuideViewModel.cs create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/Views/PowerLauncherPage.xaml create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/Views/PowerLauncherPage.xaml.cs create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/Views/PowerRenamePage.xaml create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/Views/PowerRenamePage.xaml.cs create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/Views/ShortcutGuidePage.xaml create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/Views/ShortcutGuidePage.xaml.cs diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj b/src/core/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj index dfecc2f6ef..16da96b764 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj +++ b/src/core/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj @@ -134,13 +134,25 @@ + + + GeneralPage.xaml + + PowerLauncherPage.xaml + + + PowerRenamePage.xaml + ShellPage.xaml + + ShortcutGuidePage.xaml + @@ -207,10 +219,22 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + MSBuild:Compile Designer + + Designer + MSBuild:Compile + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index 229eadb097..da66b76da9 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -129,20 +129,20 @@ Main Navigation view item name for Main - - Test1 - Navigation view item name for Test1 - - - Test2 - Navigation view item name for Test2 - - - Test3 - Navigation view item name for Test3 - General Navigation view item name for General + + PowerLauncher + Navigation view item name for PowerLauncher + + + PowerRename + Navigation view item name for PowerRename + + + Shortcut Guide + Navigation view item name for Shortcut Guide + \ No newline at end of file diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Styles/TextBlock.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Styles/TextBlock.xaml index 60e02e0f58..64d9e2d665 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Styles/TextBlock.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/Styles/TextBlock.xaml @@ -18,4 +18,9 @@ + + + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Styles/_Thickness.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Styles/_Thickness.xaml index 2683ce8952..0a31c986fd 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Styles/_Thickness.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/Styles/_Thickness.xaml @@ -9,6 +9,7 @@ 0,0,24,0 0,24,0,24 24,24,24,24 + 24,0,24,24 0,0,0,24 @@ -17,14 +18,16 @@ 0, 12, 0, 12 12, 0, 12, 0 0, 0, 12, 0 + 12, 0, 12, 12 12, 12, 12, 12 8, 0, 0, 0 0, 8, 0, 0 + 0, 0, 0, 8 8, 8, 8, 8 0, 4, 0, 0 0, 4, 4, 4 - + \ No newline at end of file diff --git a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/PowerLauncherViewModel.cs b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/PowerLauncherViewModel.cs new file mode 100644 index 0000000000..557629e4d7 --- /dev/null +++ b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/PowerLauncherViewModel.cs @@ -0,0 +1,13 @@ +using System; + +using Microsoft.PowerToys.Settings.UI.Helpers; + +namespace Microsoft.PowerToys.Settings.UI.ViewModels +{ + public class PowerLauncherViewModel : Observable + { + public PowerLauncherViewModel() + { + } + } +} \ No newline at end of file diff --git a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/PowerRenameViewModel.cs b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/PowerRenameViewModel.cs new file mode 100644 index 0000000000..fbc924881e --- /dev/null +++ b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/PowerRenameViewModel.cs @@ -0,0 +1,13 @@ +using System; + +using Microsoft.PowerToys.Settings.UI.Helpers; + +namespace Microsoft.PowerToys.Settings.UI.ViewModels +{ + public class PowerRenameViewModel : Observable + { + public PowerRenameViewModel() + { + } + } +} \ No newline at end of file diff --git a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/ShortcutGuideViewModel.cs b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/ShortcutGuideViewModel.cs new file mode 100644 index 0000000000..7183da5e11 --- /dev/null +++ b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/ShortcutGuideViewModel.cs @@ -0,0 +1,12 @@ +using System; +using Microsoft.PowerToys.Settings.UI.Helpers; + +namespace Microsoft.PowerToys.Settings.UI.ViewModels +{ + public class ShortcutGuideViewModel : Observable + { + public ShortcutGuideViewModel() + { + } + } +} \ No newline at end of file diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/GeneralPage.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Views/GeneralPage.xaml index 8c61973878..0dd40c279b 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Views/GeneralPage.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/GeneralPage.xaml @@ -11,22 +11,23 @@ - + - + - + -