From c39be3dbc93dc61732a994cb1d2820eab804da62 Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Mon, 11 May 2020 21:36:55 +0200 Subject: [PATCH] [Settings] Various UX tweaks (#2822) * Updated the add button styles to a standard used in W10 settings * Updated the "About this feature" text to About [Module name] * Set larger changes to the Shortcut Guide opacity numberbox * Re-organised the General page * Improved width of the add button so it's inline with the corresponding listview. * Seperated warning label from header. Re-organised general settings * Consistent formatting of the word 'administrator' * Typo fix * Warning text is collapsed when the user runs the app as admin * Removed underline of version number * XAML fix --- .../Microsoft.PowerToys.Settings.UI/App.xaml | 1 + .../Microsoft.PowerToys.Settings.UI.csproj | 4 + .../Strings/en-us/Resources.resw | 97 ++++++++++++------- .../Styles/Button.xaml | 74 ++++++++++++++ .../Styles/_Thickness.xaml | 2 + .../ViewModels/GeneralViewModel.cs | 22 +---- .../Views/FancyZonesPage.xaml | 4 +- .../Views/GeneralPage.xaml | 95 +++++++++++------- .../Views/ImageResizerPage.xaml | 8 +- .../Views/KeyboardManagerPage.xaml | 41 +++++--- .../Views/PowerLauncherPage.xaml | 4 +- .../Views/PowerPreviewPage.xaml | 2 +- .../Views/PowerRenamePage.xaml | 2 +- .../Views/ShortcutGuidePage.xaml | 10 +- .../ViewModelTests/General.cs | 4 - 15 files changed, 246 insertions(+), 124 deletions(-) create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/Styles/Button.xaml diff --git a/src/core/Microsoft.PowerToys.Settings.UI/App.xaml b/src/core/Microsoft.PowerToys.Settings.UI/App.xaml index 7ea0edfe34..13e116b83c 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/App.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/App.xaml @@ -13,6 +13,7 @@ + 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 6a00164230..72dc626798 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 @@ -160,6 +160,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + MSBuild:Compile Designer 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 fa4a667352..95c7f3e59a 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 @@ -177,20 +177,20 @@ Select the profile to display the active key remap and shortcuts Keyboard Manager configuration dropdown decription - + Remap a key Keyboard Manager remap keyboard button content - Remap Keyboard + Remap keyboard Keyboard Manager remap keyboard header - + Remap a shortcut Keyboard Manager remap shortcuts button - Remap Shortcuts + Remap shortcuts Keyboard Manager remap shortcuts header @@ -279,7 +279,7 @@ Zone highlight opacity (%) - Edit Hot Key/ Shortcut + Edit hot key / shortcut Keep windows pinned to multiple desktops in the same zone when the active desktop changes @@ -315,7 +315,7 @@ Move newly created windows to their last known zone - Zone Behavior + Zone behavior Zone highlight color (default: #0078D7) @@ -357,7 +357,7 @@ Request a feature - Restart as admin + Restart as administrator Run at startup @@ -366,7 +366,7 @@ Miscellaneous - A Windows Shell Extension for more advanced bulk renaming using search and replace or regular expressions. + A Windows Shell extension for more advanced bulk renaming using search and replace or regular expressions. Shell integration @@ -375,7 +375,7 @@ Enable PowerRename - Choose Settings color + Settings theme Show icon on context menu @@ -426,7 +426,7 @@ Press duration before showing (ms) - Appearance & Behavior + Appearance & behavior Enable Shortcut Guide @@ -438,7 +438,7 @@ Choose Shortcut Guide overlay color - Image Sizes + Image sizes Lets you resize images by right-clicking. @@ -447,19 +447,19 @@ Enable Image Resizer - Add Size + Add size - Save Sizes + Save sizes - JPEG Quality level + JPEG quality level PNG interlacing - TIFF Compression + TIFF compression File @@ -489,22 +489,22 @@ Zip - BMP Encoder + BMP encoder - GIF Encoder + GIF encoder - JPEG Encoder + JPEG encoder - PNG Encoder + PNG encoder - TIFF Encoder + TIFF encoder - WMPhoto Encoder + WMPhoto encoder Fill @@ -533,11 +533,8 @@ On - - Always Run as Admin - - Learn about Admin mode + Learn more about administrator mode Download updates automatically @@ -545,22 +542,52 @@ Currently running as administrator - - Always run as administrator (Restart as administrator to change this) - - + Always run as administrator - - Always run as administrator (Restart as administrator to change this) - Running as user - Running as Adminstrator + Running as adminstrator - - + + About FancyZones + + + About File Explorer Preview + + + About Image Resizer + + + About Keyboard Manager + + + About PowerLauncher + + + About Power Rename + + + About Shortcut Guide + + + Github repository + + + Updates + + + Version: + + + Background theme + + + Administrator mode + + + You need to run as administrator to use this setting \ No newline at end of file diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Styles/Button.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Styles/Button.xaml new file mode 100644 index 0000000000..8a20e47cb3 --- /dev/null +++ b/src/core/Microsoft.PowerToys.Settings.UI/Styles/Button.xaml @@ -0,0 +1,74 @@ + + + + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Styles/_Thickness.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Styles/_Thickness.xaml index 0a31c986fd..05a28978f4 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Styles/_Thickness.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/Styles/_Thickness.xaml @@ -21,6 +21,8 @@ 12, 0, 12, 12 12, 12, 12, 12 + -10, 12, 0, 0 + 8, 0, 0, 0 0, 8, 0, 0 diff --git a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/GeneralViewModel.cs b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/GeneralViewModel.cs index b9b7969b58..9e52a68bbc 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/GeneralViewModel.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/GeneralViewModel.cs @@ -126,26 +126,6 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public string AlwaysRunAsAdminText - { - get - { - if (IsElevated) - { - return loader.GetString("GeneralSettings_AlwaysRunAsAdminText_IsElevated"); - } - else - { - return loader.GetString("GeneralSettings_AlwaysRunAsAdminText_IsNotElevated"); - } - } - - set - { - OnPropertyChanged("AlwaysRunAsAdminText"); - } - } - // Gets or sets a value indicating whether run powertoys on start-up. public bool Startup { @@ -200,7 +180,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels _isElevated = value; OnPropertyChanged("IsElevated"); OnPropertyChanged("IsAdminButtonEnabled"); - OnPropertyChanged("AlwaysRunAsAdminText"); + //OnPropertyChanged("AlwaysRunAsAdminText"); OnPropertyChanged("RunningAsAdminText"); } } diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml index 91ed8651c5..36f6ebca96 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml @@ -70,7 +70,7 @@ x:Uid="FancyZones_HokeyEditorControl_Header" Width="320" HorizontalAlignment="Left" - Margin="{StaticResource SmallTopMargin}" + Margin="{StaticResource MediumTopMargin}" HotkeySettings="{x:Bind Path=ViewModel.EditorHotkey, Mode=TwoWay}" IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}" /> @@ -216,7 +216,7 @@ Width="{StaticResource SidePanelWidth}" Grid.Column="1"> - diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/GeneralPage.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Views/GeneralPage.xaml index 507f3177ce..a99c03b599 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Views/GeneralPage.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/GeneralPage.xaml @@ -6,11 +6,13 @@ xmlns:viewModel="using:Microsoft.PowerToys.Settings.UI.ViewModels" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters" xmlns:muxc="using:Microsoft.UI.Xaml.Controls" mc:Ignorable="d" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> + @@ -49,23 +51,11 @@ - - - - - - + - +