mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-18 14:41:21 +08:00
[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
This commit is contained in:
parent
8aa8c296e1
commit
c39be3dbc9
@ -13,6 +13,7 @@
|
||||
<ResourceDictionary Source="/Styles/_Sizes.xaml" />
|
||||
<ResourceDictionary Source="/Styles/TextBlock.xaml" />
|
||||
<ResourceDictionary Source="/Styles/Page.xaml"/>
|
||||
<ResourceDictionary Source="/Styles/Button.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
|
@ -160,6 +160,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\Button.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\Page.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
@ -177,20 +177,20 @@
|
||||
<value>Select the profile to display the active key remap and shortcuts</value>
|
||||
<comment>Keyboard Manager configuration dropdown decription</comment>
|
||||
</data>
|
||||
<data name="KeyboardManager_RemapKeyboardButton.Content" xml:space="preserve">
|
||||
<data name="KeyboardManager_RemapKeyboardButton.Label" xml:space="preserve">
|
||||
<value>Remap a key</value>
|
||||
<comment>Keyboard Manager remap keyboard button content</comment>
|
||||
</data>
|
||||
<data name="KeyboardManager_RemapKeyboardHeader.Text" xml:space="preserve">
|
||||
<value>Remap Keyboard</value>
|
||||
<value>Remap keyboard</value>
|
||||
<comment>Keyboard Manager remap keyboard header</comment>
|
||||
</data>
|
||||
<data name="KeyboardManager_RemapShortcutsButton.Content" xml:space="preserve">
|
||||
<data name="KeyboardManager_RemapShortcutsButton.Label" xml:space="preserve">
|
||||
<value>Remap a shortcut</value>
|
||||
<comment>Keyboard Manager remap shortcuts button</comment>
|
||||
</data>
|
||||
<data name="KeyboardManager_RemapShortcutsHeader.Text" xml:space="preserve">
|
||||
<value>Remap Shortcuts</value>
|
||||
<value>Remap shortcuts</value>
|
||||
<comment>Keyboard Manager remap shortcuts header</comment>
|
||||
</data>
|
||||
<data name="PowerLauncher_Description.Text" xml:space="preserve">
|
||||
@ -279,7 +279,7 @@
|
||||
<value>Zone highlight opacity (%)</value>
|
||||
</data>
|
||||
<data name="FancyZones_HokeyEditorControl_Header.Header" xml:space="preserve">
|
||||
<value>Edit Hot Key/ Shortcut</value>
|
||||
<value>Edit hot key / shortcut</value>
|
||||
</data>
|
||||
<data name="FancyZones_KeepWindowsPinned.Content" xml:space="preserve">
|
||||
<value>Keep windows pinned to multiple desktops in the same zone when the active desktop changes</value>
|
||||
@ -315,7 +315,7 @@
|
||||
<value>Move newly created windows to their last known zone</value>
|
||||
</data>
|
||||
<data name="FancyZones_ZoneBehavior_GroupSettings.Text" xml:space="preserve">
|
||||
<value>Zone Behavior</value>
|
||||
<value>Zone behavior</value>
|
||||
</data>
|
||||
<data name="FancyZones_ZoneHighlightColor.Text" xml:space="preserve">
|
||||
<value>Zone highlight color (default: #0078D7)</value>
|
||||
@ -357,7 +357,7 @@
|
||||
<value>Request a feature</value>
|
||||
</data>
|
||||
<data name="GeneralPage_RestartAsAdmin_Button.Content" xml:space="preserve">
|
||||
<value>Restart as admin</value>
|
||||
<value>Restart as administrator</value>
|
||||
</data>
|
||||
<data name="GeneralPage_ToggleSwitch_RunAtStartUp.Header" xml:space="preserve">
|
||||
<value>Run at startup</value>
|
||||
@ -366,7 +366,7 @@
|
||||
<value>Miscellaneous</value>
|
||||
</data>
|
||||
<data name="PowerRename_Description.Text" xml:space="preserve">
|
||||
<value>A Windows Shell Extension for more advanced bulk renaming using search and replace or regular expressions.</value>
|
||||
<value>A Windows Shell extension for more advanced bulk renaming using search and replace or regular expressions.</value>
|
||||
</data>
|
||||
<data name="PowerRename_ShellIntergration.Text" xml:space="preserve">
|
||||
<value>Shell integration</value>
|
||||
@ -375,7 +375,7 @@
|
||||
<value>Enable PowerRename</value>
|
||||
</data>
|
||||
<data name="RadioButtons_Name_Theme.Header" xml:space="preserve">
|
||||
<value>Choose Settings color</value>
|
||||
<value>Settings theme</value>
|
||||
</data>
|
||||
<data name="PowerRename_Toggle_EnableOnContextMenu.Header" xml:space="preserve">
|
||||
<value>Show icon on context menu</value>
|
||||
@ -426,7 +426,7 @@
|
||||
<value>Press duration before showing (ms)</value>
|
||||
</data>
|
||||
<data name="ShortcutGuide_Appearance_Behavior.Text" xml:space="preserve">
|
||||
<value>Appearance & Behavior</value>
|
||||
<value>Appearance & behavior</value>
|
||||
</data>
|
||||
<data name="ShortcutGuide_Enable.Header" xml:space="preserve">
|
||||
<value>Enable Shortcut Guide</value>
|
||||
@ -438,7 +438,7 @@
|
||||
<value>Choose Shortcut Guide overlay color</value>
|
||||
</data>
|
||||
<data name="ImageResizer_CustomSizes.Text" xml:space="preserve">
|
||||
<value>Image Sizes</value>
|
||||
<value>Image sizes</value>
|
||||
</data>
|
||||
<data name="ImageResizer_Description.Text" xml:space="preserve">
|
||||
<value>Lets you resize images by right-clicking.</value>
|
||||
@ -447,19 +447,19 @@
|
||||
<value>Enable Image Resizer</value>
|
||||
</data>
|
||||
<data name="ImageResizer_AddSizeButton.Label" xml:space="preserve">
|
||||
<value>Add Size</value>
|
||||
<value>Add size</value>
|
||||
</data>
|
||||
<data name="ImageResizer_SaveSizeButton.Label" xml:space="preserve">
|
||||
<value>Save Sizes</value>
|
||||
<value>Save sizes</value>
|
||||
</data>
|
||||
<data name="ImageResizer_Encoding.Text" xml:space="preserve">
|
||||
<value>JPEG Quality level</value>
|
||||
<value>JPEG quality level</value>
|
||||
</data>
|
||||
<data name="ImageResizer_PNGInterlacing.Header" xml:space="preserve">
|
||||
<value>PNG interlacing</value>
|
||||
</data>
|
||||
<data name="ImageResizer_TIFFCompression.Header" xml:space="preserve">
|
||||
<value>TIFF Compression</value>
|
||||
<value>TIFF compression</value>
|
||||
</data>
|
||||
<data name="File.Text" xml:space="preserve">
|
||||
<value>File</value>
|
||||
@ -489,22 +489,22 @@
|
||||
<value>Zip</value>
|
||||
</data>
|
||||
<data name="ImageResizer_FallbackEncoder_BMP.Content" xml:space="preserve">
|
||||
<value>BMP Encoder</value>
|
||||
<value>BMP encoder</value>
|
||||
</data>
|
||||
<data name="ImageResizer_FallbackEncoder_GIF.Content" xml:space="preserve">
|
||||
<value>GIF Encoder</value>
|
||||
<value>GIF encoder</value>
|
||||
</data>
|
||||
<data name="ImageResizer_FallbackEncoder_JPEG.Content" xml:space="preserve">
|
||||
<value>JPEG Encoder</value>
|
||||
<value>JPEG encoder</value>
|
||||
</data>
|
||||
<data name="ImageResizer_FallbackEncoder_PNG.Content" xml:space="preserve">
|
||||
<value>PNG Encoder</value>
|
||||
<value>PNG encoder</value>
|
||||
</data>
|
||||
<data name="ImageResizer_FallbackEncoder_TIFF.Content" xml:space="preserve">
|
||||
<value>TIFF Encoder</value>
|
||||
<value>TIFF encoder</value>
|
||||
</data>
|
||||
<data name="ImageResizer_FallbackEncoder_WMPhoto.Content" xml:space="preserve">
|
||||
<value>WMPhoto Encoder</value>
|
||||
<value>WMPhoto encoder</value>
|
||||
</data>
|
||||
<data name="ImageResizer_Sizes_Fit_Fill.Content" xml:space="preserve">
|
||||
<value>Fill</value>
|
||||
@ -533,11 +533,8 @@
|
||||
<data name="On.Content" xml:space="preserve">
|
||||
<value>On</value>
|
||||
</data>
|
||||
<data name="GeneralPage_ToggleSwitch_AlwaysRunElevated.Header" xml:space="preserve">
|
||||
<value>Always Run as Admin</value>
|
||||
</data>
|
||||
<data name="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link.Text" xml:space="preserve">
|
||||
<value>Learn about Admin mode</value>
|
||||
<value>Learn more about administrator mode</value>
|
||||
</data>
|
||||
<data name="GeneralPage_ToggleSwitch_AutoDownloadUpdates.Header" xml:space="preserve">
|
||||
<value>Download updates automatically</value>
|
||||
@ -545,22 +542,52 @@
|
||||
<data name="GeneralPage_ToggleSwitch_RunningAsAdminNote.Text" xml:space="preserve">
|
||||
<value>Currently running as administrator</value>
|
||||
</data>
|
||||
<data name="GeneralPage_ToggleSwitch_RunElevated.Header" xml:space="preserve">
|
||||
<value>Always run as administrator (Restart as administrator to change this)</value>
|
||||
</data>
|
||||
<data name="GeneralSettings_AlwaysRunAsAdminText_IsElevated" xml:space="preserve">
|
||||
<data name="GeneralSettings_AlwaysRunAsAdminText.Header" xml:space="preserve">
|
||||
<value>Always run as administrator</value>
|
||||
</data>
|
||||
<data name="GeneralSettings_AlwaysRunAsAdminText_IsNotElevated" xml:space="preserve">
|
||||
<value>Always run as administrator (Restart as administrator to change this)</value>
|
||||
</data>
|
||||
<data name="GeneralSettings_Running as Adminstrator_IsNotElevated" xml:space="preserve">
|
||||
<value>Running as user</value>
|
||||
</data>
|
||||
<data name="GeneralSettings_RunningAsAdminText_IsElevated" xml:space="preserve">
|
||||
<value>Running as Adminstrator</value>
|
||||
<value>Running as adminstrator</value>
|
||||
</data>
|
||||
<data name="String1" xml:space="preserve">
|
||||
<value />
|
||||
<data name="About_FancyZones.Text" xml:space="preserve">
|
||||
<value>About FancyZones</value>
|
||||
</data>
|
||||
<data name="About_FileExplorerPreview.Text" xml:space="preserve">
|
||||
<value>About File Explorer Preview</value>
|
||||
</data>
|
||||
<data name="About_ImageResizer.Text" xml:space="preserve">
|
||||
<value>About Image Resizer</value>
|
||||
</data>
|
||||
<data name="About_KeyboardManager.Text" xml:space="preserve">
|
||||
<value>About Keyboard Manager</value>
|
||||
</data>
|
||||
<data name="About_PowerLauncher.Text" xml:space="preserve">
|
||||
<value>About PowerLauncher</value>
|
||||
</data>
|
||||
<data name="About_PowerRename.Text" xml:space="preserve">
|
||||
<value>About Power Rename</value>
|
||||
</data>
|
||||
<data name="About_ShortcutGuide.Text" xml:space="preserve">
|
||||
<value>About Shortcut Guide</value>
|
||||
</data>
|
||||
<data name="General_Repository.Text" xml:space="preserve">
|
||||
<value>Github repository</value>
|
||||
</data>
|
||||
<data name="General_Updates.Text" xml:space="preserve">
|
||||
<value>Updates</value>
|
||||
</data>
|
||||
<data name="General_Version.Text" xml:space="preserve">
|
||||
<value>Version:</value>
|
||||
</data>
|
||||
<data name="Shortcut_Overlay_Theme.Header" xml:space="preserve">
|
||||
<value>Background theme</value>
|
||||
</data>
|
||||
<data name="Admin_mode.Text" xml:space="preserve">
|
||||
<value>Administrator mode</value>
|
||||
</data>
|
||||
<data name="General_RunAsAdminRequired.Text" xml:space="preserve">
|
||||
<value>You need to run as administrator to use this setting</value>
|
||||
</data>
|
||||
</root>
|
74
src/core/Microsoft.PowerToys.Settings.UI/Styles/Button.xaml
Normal file
74
src/core/Microsoft.PowerToys.Settings.UI/Styles/Button.xaml
Normal file
@ -0,0 +1,74 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="AddItemAppBarButtonStyle" TargetType="AppBarButton">
|
||||
<Setter Property="Background" Value="{ThemeResource AppBarButtonBackground}"/>
|
||||
<Setter Property="Foreground" Value="{ThemeResource AppBarButtonForeground}"/>
|
||||
<Setter Property="BorderBrush" Value="{ThemeResource AppBarButtonBorderBrush}"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="MaxWidth" Value="500"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
|
||||
<Setter Property="FontWeight" Value="Normal"/>
|
||||
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}"/>
|
||||
<Setter Property="AllowFocusOnInteraction" Value="False"/>
|
||||
<Setter Property="KeyboardAcceleratorPlacementMode" Value="Hidden"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="AppBarButton">
|
||||
<Grid x:Name="Root" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{TemplateBinding CornerRadius}" MinWidth="{TemplateBinding MinWidth}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal"/>
|
||||
<VisualState x:Name="PointerOver">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemListLowColor}"/>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<PointerUpThemeAnimation Storyboard.TargetName="ContentRoot"/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemListMediumColor}"/>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<PointerDownThemeAnimation Storyboard.TargetName="ContentRoot"/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.Background" Value="{ThemeResource AppBarButtonBackgroundDisabled}"/>
|
||||
<Setter Target="AppBarButtonInnerBorder.BorderBrush" Value="{ThemeResource AppBarButtonBorderBrushDisabled}"/>
|
||||
<Setter Target="Content.Foreground" Value="{ThemeResource AppBarButtonForegroundDisabled}"/>
|
||||
<Setter Target="TextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundDisabled}"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
|
||||
|
||||
|
||||
<Grid x:Name="ContentRoot">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="320"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="AppBarButtonInnerBorder" Margin="10" CornerRadius="4" Height="40" Width="40" Background="{ThemeResource ButtonBackground}">
|
||||
<ContentPresenter x:Name="Content" Content="{TemplateBinding Icon}" Foreground="{TemplateBinding Foreground}" RenderTransformOrigin="0.5,0.5">
|
||||
<ContentPresenter.RenderTransform>
|
||||
<CompositeTransform ScaleX="0.8" ScaleY="0.8"/>
|
||||
</ContentPresenter.RenderTransform>
|
||||
</ContentPresenter>
|
||||
</Border>
|
||||
|
||||
<TextBlock x:Name="TextLabel" Grid.Column="1" AutomationProperties.AccessibilityView="Raw" Foreground="{TemplateBinding Foreground}" Margin="0,-2,0,0" VerticalAlignment="Center" FontSize="14" Text="{TemplateBinding Label}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
@ -21,6 +21,8 @@
|
||||
<Thickness x:Key="SmallLeftRightBottomMargin">12, 0, 12, 12</Thickness>
|
||||
<Thickness x:Key="SmallLeftTopRightBottomMargin">12, 12, 12, 12</Thickness>
|
||||
|
||||
<Thickness x:Key="AddItemButtonMargin">-10, 12, 0, 0</Thickness>
|
||||
|
||||
<!--Extra Small size margins-->
|
||||
<Thickness x:Key="XSmallLeftMargin">8, 0, 0, 0</Thickness>
|
||||
<Thickness x:Key="XSmallTopMargin">0, 8, 0, 0</Thickness>
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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">
|
||||
|
||||
<TextBlock x:Uid="About_This_Feature"
|
||||
<TextBlock x:Uid="About_FancyZones"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
|
@ -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}">
|
||||
|
||||
<Page.Resources>
|
||||
<converters:BoolToObjectConverter x:Key="BoolToVisibilityConverter" TrueValue="Collapsed" FalseValue="Visible"/>
|
||||
<viewModel:GeneralViewModel x:Key="eventViewModel"/>
|
||||
</Page.Resources>
|
||||
|
||||
@ -49,23 +51,11 @@
|
||||
|
||||
<StackPanel Orientation="Vertical"
|
||||
x:Name="GeneralSettingsView">
|
||||
|
||||
<ToggleSwitch x:Uid="GeneralPage_ToggleSwitch_RunAtStartUp"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsOn="{Binding Mode=TwoWay, Path=Startup, Source={StaticResource eventViewModel}}"/>
|
||||
|
||||
<ToggleSwitch x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsOn="{Binding Mode=TwoWay, Path=AutoDownloadUpdates, Source={StaticResource eventViewModel}}"/>
|
||||
|
||||
<TextBlock Text="{Binding Mode=TwoWay, Path=RunningAsAdminText, Source={StaticResource eventViewModel}}"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource MediumTopMargin}"/>
|
||||
<TextBlock x:Uid="Admin_Mode"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"/>
|
||||
|
||||
<ToggleSwitch Margin="{StaticResource SmallTopMargin}"
|
||||
Header="{Binding Mode=TwoWay, Path=AlwaysRunAsAdminText, Source={StaticResource eventViewModel}}"
|
||||
IsEnabled="{Binding Mode=TwoWay, Path=IsElevated, Source={StaticResource eventViewModel}}"
|
||||
IsOn="{Binding Mode=TwoWay, Path=RunElevated, Source={StaticResource eventViewModel}}"/>
|
||||
<TextBlock Text="{Binding Mode=TwoWay, Path=RunningAsAdminText, Source={StaticResource eventViewModel}}"
|
||||
Margin="{StaticResource SmallTopMargin}"/>
|
||||
|
||||
<Button x:Uid="GeneralPage_RestartAsAdmin_Button"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
@ -74,10 +64,23 @@
|
||||
IsEnabled="{Binding Mode=TwoWay, Path=IsAdminButtonEnabled, Source={StaticResource eventViewModel}}"
|
||||
/>
|
||||
|
||||
<TextBlock x:Uid="General_RunAsAdminRequired"
|
||||
Foreground="{ThemeResource SystemControlErrorTextForegroundBrush}"
|
||||
Visibility="{Binding Mode=TwoWay, Path=IsElevated, Source={StaticResource eventViewModel}, Converter={StaticResource BoolToVisibilityConverter}}"
|
||||
Margin="0,24,0,-8" />
|
||||
|
||||
<TextBlock x:Uid="Appearancce_GroupSettings"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource MediumTopMargin}"/>
|
||||
<ToggleSwitch Margin="{StaticResource SmallTopMargin}"
|
||||
x:Uid="GeneralSettings_AlwaysRunAsAdminText"
|
||||
IsEnabled="{Binding Mode=TwoWay, Path=IsElevated, Source={StaticResource eventViewModel}}"
|
||||
IsOn="{Binding Mode=TwoWay, Path=RunElevated, Source={StaticResource eventViewModel}}"/>
|
||||
|
||||
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/blob/master/doc/devdocs/run-as-admin-detection.md">
|
||||
<TextBlock x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link" />
|
||||
</HyperlinkButton>
|
||||
|
||||
|
||||
<TextBlock x:Uid="ShortcutGuide_Appearance_Behavior"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
|
||||
<muxc:RadioButtons x:Uid="RadioButtons_Name_Theme" Margin="{StaticResource SmallTopMargin}">
|
||||
<RadioButton x:Uid="GeneralPage_Radio_Theme_Dark"
|
||||
@ -92,6 +95,40 @@
|
||||
Content="System default"
|
||||
IsChecked="{ Binding Mode=TwoWay, Path=IsSystemThemeRadioButtonChecked, Source={StaticResource eventViewModel}}"/>
|
||||
</muxc:RadioButtons>
|
||||
|
||||
<ToggleSwitch x:Uid="GeneralPage_ToggleSwitch_RunAtStartUp"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsOn="{Binding Mode=TwoWay, Path=Startup, Source={StaticResource eventViewModel}}"/>
|
||||
|
||||
|
||||
|
||||
<TextBlock x:Uid="General_Updates"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Version: " x:Uid="General_Version" />
|
||||
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/releases" Margin="4,-6,0,0">
|
||||
<TextBlock Text="{x:Bind ViewModel.PowerToysVersion }" />
|
||||
</HyperlinkButton>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<Button x:Uid="GeneralPage_CheckForUpdates"
|
||||
Style="{StaticResource AccentButtonStyle}"
|
||||
Foreground="White"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
Command="{Binding CheckFoUpdatesEventHandler, Source={StaticResource eventViewModel}}"
|
||||
/>
|
||||
|
||||
<TextBlock x:Uid="General_RunAsAdminRequired"
|
||||
Foreground="{ThemeResource SystemControlErrorTextForegroundBrush}"
|
||||
Visibility="{Binding Mode=TwoWay, Path=IsElevated, Source={StaticResource eventViewModel}, Converter={StaticResource BoolToVisibilityConverter}}"
|
||||
Margin="0,24,0,-20" />
|
||||
|
||||
<ToggleSwitch x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates"
|
||||
Margin="{StaticResource MediumTopMargin}"
|
||||
IsEnabled="{Binding Mode=TwoWay, Path=IsElevated, Source={StaticResource eventViewModel}}"
|
||||
IsOn="{Binding Mode=TwoWay, Path=AutoDownloadUpdates, Source={StaticResource eventViewModel}}"/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel x:Name="SidePanel"
|
||||
@ -104,19 +141,11 @@
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
<TextBlock Text="{x:Bind ViewModel.PowerToysVersion }"
|
||||
FontWeight="Bold"
|
||||
Margin="{StaticResource SmallTopMargin}" />
|
||||
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
|
||||
<TextBlock x:Uid="General_Repository"/>
|
||||
</HyperlinkButton>
|
||||
|
||||
<Button x:Uid="GeneralPage_CheckForUpdates"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
Style="{StaticResource AccentButtonStyle}"
|
||||
Foreground="White"
|
||||
Command = "{Binding CheckFoUpdatesEventHandler, Source={StaticResource eventViewModel}}"
|
||||
/>
|
||||
|
||||
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues"
|
||||
Margin="{StaticResource SmallTopMargin}">
|
||||
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
|
||||
<TextBlock x:Uid="GeneralPage_ReportAbug"/>
|
||||
</HyperlinkButton>
|
||||
|
||||
@ -132,9 +161,7 @@
|
||||
<TextBlock x:Uid="OpenSource_Notice"/>
|
||||
</HyperlinkButton>
|
||||
|
||||
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/blob/master/doc/devdocs/run-as-admin-detection.md">
|
||||
<TextBlock x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link" />
|
||||
</HyperlinkButton>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
@ -162,9 +162,11 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<AppBarButton Icon="Add"
|
||||
x:Name="AddSizeButton"
|
||||
Width="560"
|
||||
Style="{StaticResource AddItemAppBarButtonStyle}"
|
||||
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled, Source={StaticResource ViewModel}}"
|
||||
Label="Add Size"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
x:Uid="ImageResizer_AddSizeButton"
|
||||
Margin="{StaticResource AddItemButtonMargin}"
|
||||
Command = "{Binding AddImageSizeEventHandler, Source={StaticResource ViewModel}}"
|
||||
/>
|
||||
</StackPanel>
|
||||
@ -272,7 +274,7 @@
|
||||
Grid.Column="1">
|
||||
|
||||
<TextBlock
|
||||
x:Uid="About_This_Feature"
|
||||
x:Uid="About_ImageResizer"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
|
@ -143,11 +143,7 @@
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
TextWrapping="Wrap"/>
|
||||
|
||||
<Button x:Uid="KeyboardManager_RemapKeyboardButton"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
Style="{StaticResource AccentButtonStyle}"
|
||||
Command="{Binding Path=RemapKeyboardCommand}"
|
||||
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/>
|
||||
|
||||
|
||||
<ListView x:Name="RemapKeysList"
|
||||
extensions:ListViewExtensions.AlternateColor="{ThemeResource SystemControlBackgroundListLowBrush}"
|
||||
@ -158,13 +154,21 @@
|
||||
CornerRadius="4"
|
||||
MinWidth="350"
|
||||
MaxHeight="200"
|
||||
Margin="{StaticResource MediumTopBottomMargin}"
|
||||
Margin="{StaticResource SmallTopBottomMargin}"
|
||||
HorizontalAlignment="Left"
|
||||
SelectionMode="None"
|
||||
IsSwipeEnabled="False"
|
||||
Visibility="{x:Bind Path=ViewModel.RemapKeys, Mode=OneWay, Converter={StaticResource visibleIfNotEmptyConverter}}"
|
||||
/>
|
||||
|
||||
/>
|
||||
|
||||
<AppBarButton x:Uid="KeyboardManager_RemapKeyboardButton"
|
||||
Icon="Add"
|
||||
Width="370"
|
||||
Style="{StaticResource AddItemAppBarButtonStyle}"
|
||||
Command="{Binding Path=RemapKeyboardCommand}"
|
||||
Margin="{StaticResource AddItemButtonMargin}"
|
||||
HorizontalAlignment="Left"
|
||||
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/>
|
||||
|
||||
<TextBlock x:Uid="KeyboardManager_RemapShortcutsHeader"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
@ -172,12 +176,7 @@
|
||||
<TextBlock Text="Click below to remap a shortcut (hotkey) to another shortcut"
|
||||
TextWrapping="Wrap" Margin="{StaticResource SmallTopMargin}"/>
|
||||
|
||||
<Button x:Uid="KeyboardManager_RemapShortcutsButton"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
Style="{StaticResource AccentButtonStyle}"
|
||||
Command="{Binding Path=EditShortcutCommand}"
|
||||
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"
|
||||
/>
|
||||
|
||||
|
||||
<ListView x:Name="RemapShortcutsList"
|
||||
extensions:ListViewExtensions.AlternateColor="{ThemeResource SystemControlBackgroundListLowBrush}"
|
||||
@ -188,12 +187,22 @@
|
||||
CornerRadius="4"
|
||||
MinWidth="350"
|
||||
MaxHeight="200"
|
||||
Margin="{StaticResource MediumTopBottomMargin}"
|
||||
Margin="{StaticResource SmallTopBottomMargin}"
|
||||
HorizontalAlignment="Left"
|
||||
SelectionMode="None"
|
||||
IsSwipeEnabled="False"
|
||||
Visibility="{x:Bind Path=ViewModel.RemapShortcuts, Mode=OneWay, Converter={StaticResource visibleIfNotEmptyConverter}}"
|
||||
/>
|
||||
|
||||
<AppBarButton x:Uid="KeyboardManager_RemapShortcutsButton"
|
||||
Icon="Add"
|
||||
Width="370"
|
||||
Style="{StaticResource AddItemAppBarButtonStyle}"
|
||||
Command="{Binding Path=EditShortcutCommand}"
|
||||
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"
|
||||
Margin="{StaticResource AddItemButtonMargin}"
|
||||
HorizontalAlignment="Left"
|
||||
/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
@ -204,7 +213,7 @@
|
||||
Grid.Column="1">
|
||||
|
||||
<TextBlock
|
||||
Text="About this feature"
|
||||
x:Uid="About_KeyboardManager"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
|
@ -136,7 +136,7 @@
|
||||
Grid.Column="1">
|
||||
|
||||
<TextBlock
|
||||
Text="About this feature"
|
||||
x:Uid="About_PowerLauncher"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
@ -149,7 +149,7 @@
|
||||
</HyperlinkButton>
|
||||
|
||||
<TextBlock
|
||||
Text="Attribution"
|
||||
x:Uid="AttributionTitle"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}" />
|
||||
|
||||
<HyperlinkButton NavigateUri="https://github.com/Wox-launcher/Wox/">
|
||||
|
@ -59,7 +59,7 @@
|
||||
Width="{StaticResource SidePanelWidth}"
|
||||
Grid.Column="1">
|
||||
|
||||
<TextBlock x:Uid="About_This_Feature"
|
||||
<TextBlock x:Uid="About_FileExplorerPreview"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
|
@ -99,7 +99,7 @@
|
||||
Width="{StaticResource SidePanelWidth}"
|
||||
Grid.Column="1">
|
||||
|
||||
<TextBlock x:Uid="About_This_Feature"
|
||||
<TextBlock x:Uid="About_PowerRename"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
|
@ -53,11 +53,12 @@
|
||||
|
||||
<muxc:NumberBox x:Uid="ShortcutGuide_PressTime"
|
||||
Minimum="100"
|
||||
|
||||
SpinButtonPlacementMode="Inline"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
Value="{ Binding Mode=TwoWay, Path=PressTime}"
|
||||
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
|
||||
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}" SmallChange="50" LargeChange="100"/>
|
||||
|
||||
<Slider x:Uid="ShortcutGuide_OverlayOpacity"
|
||||
Minimum="0"
|
||||
@ -66,9 +67,8 @@
|
||||
HorizontalAlignment="Left"
|
||||
Margin="{StaticResource MediumTopMargin}"
|
||||
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
|
||||
|
||||
|
||||
<muxc:RadioButtons x:Uid="ShortcutGuide_Theme"
|
||||
|
||||
<muxc:RadioButtons x:Uid="RadioButtons_Name_Theme"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"
|
||||
SelectedIndex="{ Binding Mode=TwoWay, Path=ThemeIndex}">
|
||||
@ -91,7 +91,7 @@
|
||||
Grid.Column="1">
|
||||
|
||||
<TextBlock
|
||||
x:Uid="About_This_Feature"
|
||||
x:Uid="About_ShortcutGuide"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
|
||||
|
@ -52,11 +52,8 @@ namespace ViewModelTests
|
||||
|
||||
string runningAsUserText = "Running as user.";
|
||||
string runningAsAdminText = "Running as Adminstrator.";
|
||||
string runningAsUser_AlwaysRunAsAdminText = "Always run as administrator";
|
||||
string runningAsAdmin_AlwaysRunAsAdminText = "Always run as administrator (Restart as administrator to change this)";
|
||||
|
||||
Assert.AreEqual(runningAsUserText, viewModel.RunningAsAdminText);
|
||||
Assert.AreEqual(runningAsAdmin_AlwaysRunAsAdminText, viewModel.AlwaysRunAsAdminText);
|
||||
Assert.IsFalse(viewModel.IsElevated);
|
||||
|
||||
// Act
|
||||
@ -64,7 +61,6 @@ namespace ViewModelTests
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(runningAsAdminText, viewModel.RunningAsAdminText);
|
||||
Assert.AreEqual(runningAsUser_AlwaysRunAsAdminText, viewModel.AlwaysRunAsAdminText);
|
||||
Assert.IsTrue(viewModel.IsElevated);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user