mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-21 07:17:56 +08:00
Merge remote-tracking branch 'origin/main' into dev/snickler/net8-upgrade
This commit is contained in:
commit
928a57ea98
3
Directory.Build.targets
Normal file
3
Directory.Build.targets
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<Project>
|
||||||
|
<Sdk Name="Microsoft.Build.CopyOnWrite" Version="1.0.282" />
|
||||||
|
</Project>
|
@ -177,6 +177,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||||||
src\.editorconfig = src\.editorconfig
|
src\.editorconfig = src\.editorconfig
|
||||||
.vsconfig = .vsconfig
|
.vsconfig = .vsconfig
|
||||||
Directory.Build.props = Directory.Build.props
|
Directory.Build.props = Directory.Build.props
|
||||||
|
Directory.Build.targets = Directory.Build.targets
|
||||||
Directory.Packages.props = Directory.Packages.props
|
Directory.Packages.props = Directory.Packages.props
|
||||||
Solution.props = Solution.props
|
Solution.props = Solution.props
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
|
@ -12,21 +12,66 @@
|
|||||||
<!-- Other merged dictionaries here -->
|
<!-- Other merged dictionaries here -->
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackground" Color="{ThemeResource SubtleFillColorTransparent}" />
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundPointerOver" Color="{ThemeResource SubtleFillColorSecondary}" />
|
<ResourceDictionary x:Key="Default">
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundPressed" Color="{ThemeResource SubtleFillColorTertiary}" />
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SubtleFillColorTransparent" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundDisabled" Color="{ThemeResource ControlFillColorDisabled}" />
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="SubtleButtonForeground" Color="{ThemeResource TextFillColorPrimary}" />
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SubtleFillColorTransparent" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundPointerOver" Color="{ThemeResource TextFillColorPrimary}" />
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundPressed" Color="{ThemeResource TextFillColorSecondary}" />
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundDisabled" Color="{ThemeResource TextFillColorDisabled}" />
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="TextFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="TextFillColorDisabled" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
<ResourceDictionary x:Key="Light">
|
||||||
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="TextFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="TextFillColorDisabled" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
<ResourceDictionary x:Key="HighContrast">
|
||||||
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SystemColorHighlightTextColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SystemColorHighlightColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SystemColorHighlightColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SystemColorGrayTextColor" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="SystemColorButtonTextColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
|
|
||||||
<Style x:Key="SubtleButtonStyle" TargetType="Button">
|
<Style x:Key="SubtleButtonStyle" TargetType="Button">
|
||||||
<Setter Property="Background" Value="{ThemeResource SubtleButtonBackground}" />
|
<Setter Property="Background" Value="{ThemeResource SubtleButtonBackground}" />
|
||||||
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
|
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
|
||||||
<Setter Property="Foreground" Value="{ThemeResource SubtleButtonForeground}" />
|
<Setter Property="Foreground" Value="{ThemeResource SubtleButtonForeground}" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderBrush" Value="{ThemeResource SubtleButtonBorderBrush}" />
|
||||||
|
<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" />
|
||||||
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
|
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
|
||||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
@ -53,11 +98,11 @@
|
|||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
ContentTransitions="{TemplateBinding ContentTransitions}"
|
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
Foreground="{TemplateBinding Foreground}">
|
||||||
<ContentPresenter.BackgroundTransition>
|
<ContentPresenter.BackgroundTransition>
|
||||||
<BrushTransition Duration="0:0:0.083" />
|
<BrushTransition Duration="0:0:0.083" />
|
||||||
</ContentPresenter.BackgroundTransition>
|
</ContentPresenter.BackgroundTransition>
|
||||||
|
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
<VisualState x:Name="Normal" />
|
<VisualState x:Name="Normal" />
|
||||||
@ -66,6 +111,9 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPointerOver}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPointerOver}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushPointerOver}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPointerOver}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPointerOver}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@ -74,12 +122,14 @@
|
|||||||
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="PointerOver" />
|
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="PointerOver" />
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
|
||||||
<VisualState x:Name="Pressed">
|
<VisualState x:Name="Pressed">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPressed}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPressed}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushPressed}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPressed}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPressed}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@ -88,12 +138,14 @@
|
|||||||
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Pressed" />
|
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Pressed" />
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
|
||||||
<VisualState x:Name="Disabled">
|
<VisualState x:Name="Disabled">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundDisabled}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundDisabled}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushDisabled}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundDisabled}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundDisabled}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
@ -635,7 +635,8 @@
|
|||||||
<Flyout
|
<Flyout
|
||||||
x:Name="AddVariableFlyout"
|
x:Name="AddVariableFlyout"
|
||||||
Closed="AddVariableFlyout_Closed"
|
Closed="AddVariableFlyout_Closed"
|
||||||
Placement="Right">
|
Placement="Right"
|
||||||
|
ShouldConstrainToRootBounds="False">
|
||||||
<Grid Width="320" Height="480">
|
<Grid Width="320" Height="480">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
@ -10,24 +10,67 @@
|
|||||||
<!-- Other merged dictionaries here -->
|
<!-- Other merged dictionaries here -->
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackground" Color="{ThemeResource SubtleFillColorTransparent}" />
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundPointerOver" Color="{ThemeResource SubtleFillColorSecondary}" />
|
<ResourceDictionary x:Key="Default">
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundPressed" Color="{ThemeResource SubtleFillColorTertiary}" />
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SubtleFillColorTransparent" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundDisabled" Color="{ThemeResource SubtleFillColorTransparent}" />
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="SubtleButtonForeground" Color="{ThemeResource TextFillColorPrimary}" />
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SubtleFillColorTransparent" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundPointerOver" Color="{ThemeResource TextFillColorPrimary}" />
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundPressed" Color="{ThemeResource TextFillColorSecondary}" />
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundDisabled" Color="{ThemeResource TextFillColorDisabled}" />
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="TextFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="TextFillColorDisabled" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
<ResourceDictionary x:Key="Light">
|
||||||
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="TextFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="TextFillColorDisabled" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
<ResourceDictionary x:Key="HighContrast">
|
||||||
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SystemColorHighlightTextColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SystemColorHighlightColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SystemColorHighlightColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SystemColorGrayTextColor" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="SystemColorButtonTextColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
|
|
||||||
<Style x:Key="SubtleButtonStyle" TargetType="Button">
|
<Style x:Key="SubtleButtonStyle" TargetType="Button">
|
||||||
<Setter Property="Background" Value="{ThemeResource SubtleButtonBackground}" />
|
<Setter Property="Background" Value="{ThemeResource SubtleButtonBackground}" />
|
||||||
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
|
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
|
||||||
<Setter Property="Foreground" Value="{ThemeResource SubtleButtonForeground}" />
|
<Setter Property="Foreground" Value="{ThemeResource SubtleButtonForeground}" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderBrush" Value="{ThemeResource SubtleButtonBorderBrush}" />
|
||||||
<Setter Property="Width" Value="36" />
|
<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" />
|
||||||
<Setter Property="Padding" Value="0" />
|
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
|
||||||
<Setter Property="Height" Value="36" />
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||||
@ -53,11 +96,11 @@
|
|||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
ContentTransitions="{TemplateBinding ContentTransitions}"
|
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
Foreground="{TemplateBinding Foreground}">
|
||||||
<ContentPresenter.BackgroundTransition>
|
<ContentPresenter.BackgroundTransition>
|
||||||
<BrushTransition Duration="0:0:0.083" />
|
<BrushTransition Duration="0:0:0.083" />
|
||||||
</ContentPresenter.BackgroundTransition>
|
</ContentPresenter.BackgroundTransition>
|
||||||
|
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
<VisualState x:Name="Normal" />
|
<VisualState x:Name="Normal" />
|
||||||
@ -66,6 +109,9 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPointerOver}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPointerOver}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushPointerOver}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPointerOver}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPointerOver}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@ -74,12 +120,14 @@
|
|||||||
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="PointerOver" />
|
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="PointerOver" />
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
|
||||||
<VisualState x:Name="Pressed">
|
<VisualState x:Name="Pressed">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPressed}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPressed}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushPressed}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPressed}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPressed}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@ -88,12 +136,14 @@
|
|||||||
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Pressed" />
|
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Pressed" />
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
|
||||||
<VisualState x:Name="Disabled">
|
<VisualState x:Name="Disabled">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundDisabled}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundDisabled}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushDisabled}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundDisabled}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundDisabled}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@ -110,7 +160,6 @@
|
|||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
|
@ -11,24 +11,66 @@
|
|||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackground" Color="{ThemeResource SubtleFillColorTransparent}" />
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundPointerOver" Color="{ThemeResource SubtleFillColorSecondary}" />
|
<ResourceDictionary x:Key="Default">
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundPressed" Color="{ThemeResource SubtleFillColorTertiary}" />
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SubtleFillColorTransparent" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundDisabled" Color="{ThemeResource ControlFillColorDisabled}" />
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="SubtleButtonForeground" Color="{ThemeResource TextFillColorPrimary}" />
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SubtleFillColorTransparent" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundPointerOver" Color="{ThemeResource TextFillColorPrimary}" />
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundPressed" Color="{ThemeResource TextFillColorSecondary}" />
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundDisabled" Color="{ThemeResource TextFillColorDisabled}" />
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="WindowCaptionBackground">Transparent</SolidColorBrush>
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="TextFillColorPrimary" />
|
||||||
<SolidColorBrush x:Key="WindowCaptionBackgroundDisabled">Transparent</SolidColorBrush>
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="TextFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="TextFillColorDisabled" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
<ResourceDictionary x:Key="Light">
|
||||||
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="TextFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="TextFillColorDisabled" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
<ResourceDictionary x:Key="HighContrast">
|
||||||
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SystemColorHighlightTextColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SystemColorHighlightColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SystemColorHighlightColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SystemColorGrayTextColor" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="SystemColorButtonTextColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
|
|
||||||
<Style x:Key="SubtleButtonStyle" TargetType="Button">
|
<Style x:Key="SubtleButtonStyle" TargetType="Button">
|
||||||
<Setter Property="Background" Value="{ThemeResource SubtleButtonBackground}" />
|
<Setter Property="Background" Value="{ThemeResource SubtleButtonBackground}" />
|
||||||
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
|
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
|
||||||
<Setter Property="Foreground" Value="{ThemeResource SubtleButtonForeground}" />
|
<Setter Property="Foreground" Value="{ThemeResource SubtleButtonForeground}" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderBrush" Value="{ThemeResource SubtleButtonBorderBrush}" />
|
||||||
|
<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" />
|
||||||
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
|
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
|
||||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
@ -55,11 +97,11 @@
|
|||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
ContentTransitions="{TemplateBinding ContentTransitions}"
|
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
Foreground="{TemplateBinding Foreground}">
|
||||||
<ContentPresenter.BackgroundTransition>
|
<ContentPresenter.BackgroundTransition>
|
||||||
<BrushTransition Duration="0:0:0.083" />
|
<BrushTransition Duration="0:0:0.083" />
|
||||||
</ContentPresenter.BackgroundTransition>
|
</ContentPresenter.BackgroundTransition>
|
||||||
|
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
<VisualState x:Name="Normal" />
|
<VisualState x:Name="Normal" />
|
||||||
@ -68,6 +110,9 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPointerOver}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPointerOver}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushPointerOver}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPointerOver}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPointerOver}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@ -76,12 +121,14 @@
|
|||||||
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="PointerOver" />
|
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="PointerOver" />
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
|
||||||
<VisualState x:Name="Pressed">
|
<VisualState x:Name="Pressed">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPressed}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPressed}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushPressed}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPressed}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPressed}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@ -90,12 +137,14 @@
|
|||||||
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Pressed" />
|
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Pressed" />
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
|
||||||
<VisualState x:Name="Disabled">
|
<VisualState x:Name="Disabled">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundDisabled}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundDisabled}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushDisabled}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundDisabled}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundDisabled}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
FontSize=16}"
|
FontSize=16}"
|
||||||
Style="{StaticResource SubtleButtonStyle}">
|
Style="{StaticResource SubtleButtonStyle}">
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<Flyout>
|
<Flyout ShouldConstrainToRootBounds="False">
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Width="320"
|
Width="320"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />
|
||||||
|
|
||||||
<Target Name="GenerateResourceFiles" BeforeTargets="PrepareForBuild">
|
<Target Name="GenerateResourceFiles" BeforeTargets="PrepareForBuild">
|
||||||
<Exec Command="powershell -NonInteractive -executionpolicy Unrestricted $(SolutionDir)tools\build\convert-resx-to-rc.ps1 ..\dll resource.base.h resource.h KeyboardManager.base.rc KeyboardManager.rc" />
|
<Exec Command="powershell -NonInteractive -executionpolicy Unrestricted $(SolutionDir)tools\build\convert-resx-to-rc.ps1 ..\dll resource.base.h resource.h KeyboardManager.base.rc KeyboardManager.rc" />
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -7,10 +7,10 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Abstractions;
|
using System.IO.Abstractions;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.Plugin.Program.Programs;
|
|
||||||
using Microsoft.Plugin.Program.Storage;
|
using Microsoft.Plugin.Program.Storage;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Moq;
|
using Moq;
|
||||||
|
using Wox.Infrastructure;
|
||||||
using Wox.Infrastructure.FileSystemHelper;
|
using Wox.Infrastructure.FileSystemHelper;
|
||||||
using Wox.Infrastructure.Storage;
|
using Wox.Infrastructure.Storage;
|
||||||
using Win32Program = Microsoft.Plugin.Program.Programs.Win32Program;
|
using Win32Program = Microsoft.Plugin.Program.Programs.Win32Program;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
namespace Microsoft.Plugin.Program.Programs
|
namespace Wox.Infrastructure
|
||||||
{
|
{
|
||||||
public interface IShellLinkHelper
|
public interface IShellLinkHelper
|
||||||
{
|
{
|
@ -82,7 +82,19 @@ namespace Wox.Infrastructure.Image
|
|||||||
|
|
||||||
public static BitmapSource GetThumbnail(string fileName, int width, int height, ThumbnailOptions options)
|
public static BitmapSource GetThumbnail(string fileName, int width, int height, ThumbnailOptions options)
|
||||||
{
|
{
|
||||||
IntPtr hBitmap = GetHBitmap(Path.GetFullPath(fileName), width, height, options);
|
IntPtr hBitmap = IntPtr.Zero;
|
||||||
|
if (Path.GetExtension(fileName).Equals(".lnk", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
// If the file has a '.lnk' extension, it is a shortcut file. Use the shellLinkHelper to retrieve the actual target file path from the shortcut.
|
||||||
|
IShellLinkHelper shellLinkHelper = new ShellLinkHelper();
|
||||||
|
|
||||||
|
string targetFilePath = shellLinkHelper.RetrieveTargetPath(fileName);
|
||||||
|
hBitmap = ExtractIconToHBitmap(targetFilePath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hBitmap = GetHBitmap(Path.GetFullPath(fileName), width, height, options);
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -119,7 +131,7 @@ namespace Wox.Infrastructure.Image
|
|||||||
|
|
||||||
HResult hr = ((IShellItemImageFactory)nativeShellItem).GetImage(nativeSize, options, out hBitmap);
|
HResult hr = ((IShellItemImageFactory)nativeShellItem).GetImage(nativeSize, options, out hBitmap);
|
||||||
|
|
||||||
// if extracting image thumbnail and failed, extract shell icon
|
// if extracting image thumbnail and failed, extract shell icon
|
||||||
if (options == ThumbnailOptions.ThumbnailOnly && hr == HResult.ExtractionFailed)
|
if (options == ThumbnailOptions.ThumbnailOnly && hr == HResult.ExtractionFailed)
|
||||||
{
|
{
|
||||||
hr = ((IShellItemImageFactory)nativeShellItem).GetImage(nativeSize, ThumbnailOptions.IconOnly, out hBitmap);
|
hr = ((IShellItemImageFactory)nativeShellItem).GetImage(nativeSize, ThumbnailOptions.IconOnly, out hBitmap);
|
||||||
@ -146,6 +158,19 @@ namespace Wox.Infrastructure.Image
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IntPtr ExtractIconToHBitmap(string fileName)
|
||||||
|
{
|
||||||
|
// Extracts the icon associated with the file
|
||||||
|
using (System.Drawing.Icon thumbnailIcon = System.Drawing.Icon.ExtractAssociatedIcon(fileName))
|
||||||
|
{
|
||||||
|
// Convert to Bitmap
|
||||||
|
using (System.Drawing.Bitmap bitmap = thumbnailIcon.ToBitmap())
|
||||||
|
{
|
||||||
|
return bitmap.GetHbitmap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static bool logReportedAdobeReaderDetected; // Keep track if Adobe Reader detection has been logged yet.
|
private static bool logReportedAdobeReaderDetected; // Keep track if Adobe Reader detection has been logged yet.
|
||||||
private static bool logReportedErrorInDetectingAdobeReader; // Keep track if we reported an exception while trying to detect Adobe Reader yet.
|
private static bool logReportedErrorInDetectingAdobeReader; // Keep track if we reported an exception while trying to detect Adobe Reader yet.
|
||||||
private static bool adobeReaderDetectionLastResult; // The last result when Adobe Reader detection has read the registry.
|
private static bool adobeReaderDetectionLastResult; // The last result when Adobe Reader detection has read the registry.
|
||||||
|
@ -7,10 +7,9 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Runtime.InteropServices.ComTypes;
|
using System.Runtime.InteropServices.ComTypes;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Accessibility;
|
using Accessibility;
|
||||||
using Microsoft.Plugin.Program.Logger;
|
|
||||||
using Wox.Plugin.Logger;
|
using Wox.Plugin.Logger;
|
||||||
|
|
||||||
namespace Microsoft.Plugin.Program.Programs
|
namespace Wox.Infrastructure
|
||||||
{
|
{
|
||||||
public class ShellLinkHelper : IShellLinkHelper
|
public class ShellLinkHelper : IShellLinkHelper
|
||||||
{
|
{
|
||||||
@ -142,7 +141,7 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
}
|
}
|
||||||
catch (System.IO.FileNotFoundException ex)
|
catch (System.IO.FileNotFoundException ex)
|
||||||
{
|
{
|
||||||
ProgramLogger.Exception("Path could not be retrieved", ex, GetType(), path);
|
Log.Exception("Path could not be retrieved", ex, GetType(), path);
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +164,7 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
((IShellLinkW)link).GetDescription(buffer, MAX_PATH);
|
((IShellLinkW)link).GetDescription(buffer, MAX_PATH);
|
||||||
Description = buffer.ToString();
|
Description = buffer.ToString();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (System.Exception e)
|
||||||
{
|
{
|
||||||
Log.Exception($"Failed to fetch description for {target}, {e.Message}", e, GetType());
|
Log.Exception($"Failed to fetch description for {target}, {e.Message}", e, GetType());
|
||||||
Description = string.Empty;
|
Description = string.Empty;
|
@ -217,7 +217,7 @@
|
|||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
Visibility="{Binding ElementName=checkBox_regex, Path=IsChecked}">
|
Visibility="{Binding ElementName=checkBox_regex, Path=IsChecked}">
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<Flyout x:Name="RegExFlyout">
|
<Flyout x:Name="RegExFlyout" ShouldConstrainToRootBounds="False">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
|
@ -17,7 +17,7 @@ namespace MarkdownPreviewHandlerUnitTests
|
|||||||
public class MarkdownPreviewHandlerTest
|
public class MarkdownPreviewHandlerTest
|
||||||
{
|
{
|
||||||
// A long timeout is needed. WebView2 can take a long time to load the first time in some CI systems.
|
// A long timeout is needed. WebView2 can take a long time to load the first time in some CI systems.
|
||||||
private static readonly int HardTimeoutInMilliseconds = 30000;
|
private static readonly int HardTimeoutInMilliseconds = 60000;
|
||||||
private static readonly int SleepTimeInMilliseconds = 200;
|
private static readonly int SleepTimeInMilliseconds = 200;
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Runtime.InteropServices.ComTypes;
|
using System.Runtime.InteropServices.ComTypes;
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Microsoft.PowerToys.PreviewHandler.Svg;
|
using Microsoft.PowerToys.PreviewHandler.Svg;
|
||||||
@ -22,7 +20,7 @@ namespace SvgPreviewHandlerUnitTests
|
|||||||
public class SvgPreviewControlTests
|
public class SvgPreviewControlTests
|
||||||
{
|
{
|
||||||
// A long timeout is needed. WebView2 can take a long time to load the first time in some CI systems.
|
// A long timeout is needed. WebView2 can take a long time to load the first time in some CI systems.
|
||||||
private static readonly int HardTimeoutInMilliseconds = 30000;
|
private static readonly int HardTimeoutInMilliseconds = 60000;
|
||||||
private static readonly int SleepTimeInMilliseconds = 200;
|
private static readonly int SleepTimeInMilliseconds = 200;
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />
|
||||||
|
|
||||||
<Target Name="IncrementalClean" />
|
<Target Name="IncrementalClean" />
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
using global::PowerToys.GPOWrapper;
|
using global::PowerToys.GPOWrapper;
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
using Microsoft.PowerToys.Settings.UI.Library;
|
using Microsoft.PowerToys.Settings.UI.Library;
|
||||||
|
using Microsoft.PowerToys.Settings.UI.Views;
|
||||||
|
using Windows.UI;
|
||||||
|
|
||||||
namespace Microsoft.PowerToys.Settings.UI.Helpers
|
namespace Microsoft.PowerToys.Settings.UI.Helpers
|
||||||
{
|
{
|
||||||
@ -129,5 +131,69 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
|
|||||||
default: return GpoRuleConfigured.Unavailable;
|
default: return GpoRuleConfigured.Unavailable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Color GetModuleAccentColor(ModuleType moduleType)
|
||||||
|
{
|
||||||
|
return moduleType switch
|
||||||
|
{
|
||||||
|
ModuleType.AlwaysOnTop => Color.FromArgb(255, 74, 196, 242), // #4ac4f2
|
||||||
|
ModuleType.Awake => Color.FromArgb(255, 40, 177, 233), // #28b1e9
|
||||||
|
ModuleType.ColorPicker => Color.FromArgb(255, 7, 129, 211), // #0781d3
|
||||||
|
ModuleType.CropAndLock => Color.FromArgb(255, 32, 166, 228), // #20a6e4
|
||||||
|
ModuleType.EnvironmentVariables => Color.FromArgb(255, 16, 132, 208), // #1084d0
|
||||||
|
ModuleType.FancyZones => Color.FromArgb(255, 65, 209, 247), // #41d1f7
|
||||||
|
ModuleType.FileLocksmith => Color.FromArgb(255, 245, 161, 20), // #f5a114
|
||||||
|
ModuleType.FindMyMouse => Color.FromArgb(255, 104, 109, 112), // #686d70
|
||||||
|
ModuleType.Hosts => Color.FromArgb(255, 16, 132, 208), // #1084d0
|
||||||
|
ModuleType.ImageResizer => Color.FromArgb(255, 85, 207, 248), // #55cff8
|
||||||
|
ModuleType.KeyboardManager => Color.FromArgb(255, 224, 231, 238), // #e0e7ee
|
||||||
|
ModuleType.MouseHighlighter => Color.FromArgb(255, 17, 126, 199), // #117ec7
|
||||||
|
ModuleType.MouseJump => Color.FromArgb(255, 240, 240, 239), // #f0f0ef
|
||||||
|
ModuleType.MousePointerCrosshairs => Color.FromArgb(255, 25, 115, 182), // #1973b6
|
||||||
|
ModuleType.MouseWithoutBorders => Color.FromArgb(255, 31, 164, 227), // #1fa4e3
|
||||||
|
ModuleType.PastePlain => Color.FromArgb(255, 243, 156, 16), // #f39c10
|
||||||
|
ModuleType.Peek => Color.FromArgb(255, 255, 214, 103), // #ffd667
|
||||||
|
ModuleType.PowerRename => Color.FromArgb(255, 43, 186, 243), // #2bbaf3
|
||||||
|
ModuleType.PowerLauncher => Color.FromArgb(255, 51, 191, 240), // #33bff0
|
||||||
|
ModuleType.PowerAccent => Color.FromArgb(255, 84, 89, 92), // #54595c
|
||||||
|
ModuleType.RegistryPreview => Color.FromArgb(255, 17, 80, 138), // #11508a
|
||||||
|
ModuleType.MeasureTool => Color.FromArgb(255, 135, 144, 153), // #879099
|
||||||
|
ModuleType.ShortcutGuide => Color.FromArgb(255, 193, 202, 209), // #c1cad1
|
||||||
|
ModuleType.PowerOCR => Color.FromArgb(255, 24, 153, 224), // #1899e0
|
||||||
|
_ => Color.FromArgb(255, 255, 255, 255), // never called, all values listed above
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static System.Type GetModulePageType(ModuleType moduleType)
|
||||||
|
{
|
||||||
|
return moduleType switch
|
||||||
|
{
|
||||||
|
ModuleType.AlwaysOnTop => typeof(AlwaysOnTopPage),
|
||||||
|
ModuleType.Awake => typeof(AwakePage),
|
||||||
|
ModuleType.ColorPicker => typeof(ColorPickerPage),
|
||||||
|
ModuleType.CropAndLock => typeof(CropAndLockPage),
|
||||||
|
ModuleType.EnvironmentVariables => typeof(EnvironmentVariablesPage),
|
||||||
|
ModuleType.FancyZones => typeof(FancyZonesPage),
|
||||||
|
ModuleType.FileLocksmith => typeof(FileLocksmithPage),
|
||||||
|
ModuleType.FindMyMouse => typeof(MouseUtilsPage),
|
||||||
|
ModuleType.Hosts => typeof(HostsPage),
|
||||||
|
ModuleType.ImageResizer => typeof(ImageResizerPage),
|
||||||
|
ModuleType.KeyboardManager => typeof(KeyboardManagerPage),
|
||||||
|
ModuleType.MouseHighlighter => typeof(MouseUtilsPage),
|
||||||
|
ModuleType.MouseJump => typeof(MouseUtilsPage),
|
||||||
|
ModuleType.MousePointerCrosshairs => typeof(MouseUtilsPage),
|
||||||
|
ModuleType.MouseWithoutBorders => typeof(MouseWithoutBordersPage),
|
||||||
|
ModuleType.PastePlain => typeof(PastePlainPage),
|
||||||
|
ModuleType.Peek => typeof(PeekPage),
|
||||||
|
ModuleType.PowerRename => typeof(PowerRenamePage),
|
||||||
|
ModuleType.PowerLauncher => typeof(PowerLauncherPage),
|
||||||
|
ModuleType.PowerAccent => typeof(PowerAccentPage),
|
||||||
|
ModuleType.RegistryPreview => typeof(RegistryPreviewPage),
|
||||||
|
ModuleType.MeasureTool => typeof(MeasureToolPage),
|
||||||
|
ModuleType.ShortcutGuide => typeof(ShortcutGuidePage),
|
||||||
|
ModuleType.PowerOCR => typeof(PowerOcrPage),
|
||||||
|
_ => typeof(DashboardPage), // never called, all values listed above
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
</Border.Background>
|
</Border.Background>
|
||||||
</Border>
|
</Border>
|
||||||
<DropDownButton.Flyout>
|
<DropDownButton.Flyout>
|
||||||
<Flyout>
|
<Flyout ShouldConstrainToRootBounds="False">
|
||||||
<ColorPicker
|
<ColorPicker
|
||||||
IsAlphaEnabled="True"
|
IsAlphaEnabled="True"
|
||||||
IsAlphaSliderVisible="True"
|
IsAlphaSliderVisible="True"
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
</Border.Background>
|
</Border.Background>
|
||||||
</Border>
|
</Border>
|
||||||
<DropDownButton.Flyout>
|
<DropDownButton.Flyout>
|
||||||
<Flyout>
|
<Flyout ShouldConstrainToRootBounds="False">
|
||||||
<ColorPicker
|
<ColorPicker
|
||||||
IsAlphaEnabled="False"
|
IsAlphaEnabled="False"
|
||||||
IsAlphaSliderVisible="False"
|
IsAlphaSliderVisible="False"
|
||||||
|
@ -1,22 +1,65 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackground" Color="{ThemeResource SubtleFillColorTransparent}" />
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundPointerOver" Color="{ThemeResource SubtleFillColorSecondary}" />
|
<ResourceDictionary x:Key="Default">
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundPressed" Color="{ThemeResource SubtleFillColorTertiary}" />
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SubtleFillColorTransparent" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonBackgroundDisabled" Color="{ThemeResource SubtleFillColorTransparent}" />
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForeground" Color="{ThemeResource TextFillColorPrimary}" />
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundPointerOver" Color="{ThemeResource TextFillColorPrimary}" />
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundPressed" Color="{ThemeResource TextFillColorSecondary}" />
|
|
||||||
<SolidColorBrush x:Key="SubtleButtonForegroundDisabled" Color="{ThemeResource TextFillColorDisabled}" />
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="TextFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="TextFillColorDisabled" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
<ResourceDictionary x:Key="Light">
|
||||||
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SubtleFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SubtleFillColorTertiary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SubtleFillColorTransparent" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="TextFillColorPrimary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="TextFillColorSecondary" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="TextFillColorDisabled" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
<ResourceDictionary x:Key="HighContrast">
|
||||||
|
<StaticResource x:Key="SubtleButtonBackground" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPointerOver" ResourceKey="SystemColorHighlightTextColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundPressed" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrush" ResourceKey="SystemColorWindowColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPointerOver" ResourceKey="SystemColorHighlightColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushPressed" ResourceKey="SystemColorHighlightColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonBorderBrushDisabled" ResourceKey="SystemColorGrayTextColor" />
|
||||||
|
|
||||||
|
<StaticResource x:Key="SubtleButtonForeground" ResourceKey="SystemColorButtonTextColorBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
|
||||||
|
<StaticResource x:Key="SubtleButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
|
|
||||||
<Style x:Key="SubtleButtonStyle" TargetType="Button">
|
<Style x:Key="SubtleButtonStyle" TargetType="Button">
|
||||||
<Setter Property="Background" Value="{ThemeResource SubtleButtonBackground}" />
|
<Setter Property="Background" Value="{ThemeResource SubtleButtonBackground}" />
|
||||||
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
|
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
|
||||||
<Setter Property="Foreground" Value="{ThemeResource SubtleButtonForeground}" />
|
<Setter Property="Foreground" Value="{ThemeResource SubtleButtonForeground}" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderBrush" Value="{ThemeResource SubtleButtonBorderBrush}" />
|
||||||
<Setter Property="Width" Value="36" />
|
<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" />
|
||||||
<Setter Property="Padding" Value="0" />
|
|
||||||
<Setter Property="Height" Value="36" />
|
|
||||||
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
|
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
|
||||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
@ -43,11 +86,11 @@
|
|||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
ContentTransitions="{TemplateBinding ContentTransitions}"
|
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
Foreground="{TemplateBinding Foreground}">
|
||||||
<ContentPresenter.BackgroundTransition>
|
<ContentPresenter.BackgroundTransition>
|
||||||
<BrushTransition Duration="0:0:0.083" />
|
<BrushTransition Duration="0:0:0.083" />
|
||||||
</ContentPresenter.BackgroundTransition>
|
</ContentPresenter.BackgroundTransition>
|
||||||
|
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
<VisualState x:Name="Normal" />
|
<VisualState x:Name="Normal" />
|
||||||
@ -56,6 +99,9 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPointerOver}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPointerOver}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushPointerOver}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPointerOver}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPointerOver}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@ -64,12 +110,14 @@
|
|||||||
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="PointerOver" />
|
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="PointerOver" />
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
|
||||||
<VisualState x:Name="Pressed">
|
<VisualState x:Name="Pressed">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPressed}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundPressed}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushPressed}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPressed}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundPressed}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@ -78,12 +126,14 @@
|
|||||||
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Pressed" />
|
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Pressed" />
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
|
||||||
<VisualState x:Name="Disabled">
|
<VisualState x:Name="Disabled">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundDisabled}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBackgroundDisabled}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonBorderBrushDisabled}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundDisabled}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleButtonForegroundDisabled}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
||||||
<ResourceDictionary x:Key="HighContrast">
|
<ResourceDictionary x:Key="HighContrast">
|
||||||
<SolidColorBrush x:Key="InfoBarInformationalSeverityBackgroundBrush" Color="#FF34424d" />
|
<SolidColorBrush x:Key="InfoBarInformationalSeverityBackgroundBrush" Color="{StaticResource SystemColorWindowColor}" />
|
||||||
<SolidColorBrush x:Key="SolidBackgroundBrush" Color="Black" />
|
<SolidColorBrush x:Key="SolidBackgroundBrush" Color="{StaticResource SystemColorWindowTextColor}" />
|
||||||
<Color x:Key="InfoBarInformationalSeverityIconBackground">#FF5fb2f2</Color>
|
<Color x:Key="InfoBarInformationalSeverityIconBackground">#FF5fb2f2</Color>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<Page
|
<Page
|
||||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.DashboardPage"
|
x:Class="Microsoft.PowerToys.Settings.UI.Views.DashboardPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
@ -101,7 +101,10 @@
|
|||||||
<DataTemplate x:Key="ModuleItemKBMTemplate" x:DataType="viewmodels:DashboardModuleKBMItem">
|
<DataTemplate x:Key="ModuleItemKBMTemplate" x:DataType="viewmodels:DashboardModuleKBMItem">
|
||||||
<Button x:Uid="DashboardKBMShowMappingsButton" HorizontalAlignment="Stretch">
|
<Button x:Uid="DashboardKBMShowMappingsButton" HorizontalAlignment="Stretch">
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<Flyout x:Name="DetailsFlyout" Placement="Bottom">
|
<Flyout
|
||||||
|
x:Name="DetailsFlyout"
|
||||||
|
Placement="Bottom"
|
||||||
|
ShouldConstrainToRootBounds="False">
|
||||||
<StackPanel Orientation="Vertical" Spacing="4">
|
<StackPanel Orientation="Vertical" Spacing="4">
|
||||||
<ItemsControl ItemsSource="{x:Bind Path=RemapKeys, Mode=OneWay}">
|
<ItemsControl ItemsSource="{x:Bind Path=RemapKeys, Mode=OneWay}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
@ -300,77 +303,86 @@
|
|||||||
</ItemsRepeater.Layout>
|
</ItemsRepeater.Layout>
|
||||||
<ItemsRepeater.ItemTemplate>
|
<ItemsRepeater.ItemTemplate>
|
||||||
<DataTemplate x:DataType="viewmodels:DashboardListItem">
|
<DataTemplate x:DataType="viewmodels:DashboardListItem">
|
||||||
<Grid
|
<Button
|
||||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
Padding="0"
|
||||||
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
HorizontalAlignment="Stretch"
|
||||||
BorderThickness="1"
|
HorizontalContentAlignment="Stretch"
|
||||||
CornerRadius="{StaticResource OverlayCornerRadius}"
|
Background="Transparent"
|
||||||
RowSpacing="0">
|
BorderThickness="0"
|
||||||
<Grid.RowDefinitions>
|
Click="DashboardListItemClick"
|
||||||
<RowDefinition />
|
Tag="{x:Bind Tag, Mode=OneWay}">
|
||||||
<RowDefinition />
|
<Grid
|
||||||
</Grid.RowDefinitions>
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||||
<Border Grid.RowSpan="2" Opacity="0.05">
|
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
||||||
<Border.Background>
|
BorderThickness="1"
|
||||||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,3">
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
||||||
<GradientStop Offset="0.5" Color="{x:Bind AccentColor, Mode=OneWay}" />
|
RowSpacing="0">
|
||||||
<GradientStop Offset="0.9" Color="Transparent" />
|
<Grid.RowDefinitions>
|
||||||
</LinearGradientBrush>
|
<RowDefinition />
|
||||||
</Border.Background>
|
<RowDefinition />
|
||||||
</Border>
|
</Grid.RowDefinitions>
|
||||||
<Grid Margin="16,8,16,0" ColumnSpacing="12">
|
<Border Grid.RowSpan="2" Opacity="0.05">
|
||||||
<Grid.ColumnDefinitions>
|
<Border.Background>
|
||||||
<ColumnDefinition Width="Auto" />
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,3">
|
||||||
<ColumnDefinition Width="*" />
|
<GradientStop Offset="0.5" Color="{x:Bind AccentColor, Mode=OneWay}" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<GradientStop Offset="0.9" Color="Transparent" />
|
||||||
<ColumnDefinition Width="Auto" />
|
</LinearGradientBrush>
|
||||||
</Grid.ColumnDefinitions>
|
</Border.Background>
|
||||||
<Image Width="20" Margin="0,0,0,0">
|
</Border>
|
||||||
<Image.Source>
|
<Grid Margin="16,8,16,0" ColumnSpacing="12">
|
||||||
<BitmapImage UriSource="{x:Bind Icon, Mode=OneWay}" />
|
<Grid.ColumnDefinitions>
|
||||||
</Image.Source>
|
<ColumnDefinition Width="Auto" />
|
||||||
</Image>
|
<ColumnDefinition Width="*" />
|
||||||
<TextBlock
|
<ColumnDefinition Width="Auto" />
|
||||||
Grid.Column="1"
|
<ColumnDefinition Width="Auto" />
|
||||||
VerticalAlignment="Center"
|
</Grid.ColumnDefinitions>
|
||||||
FontWeight="SemiBold"
|
<Image Width="20" Margin="0,0,0,0">
|
||||||
Text="{x:Bind Label, Mode=OneWay}"
|
<Image.Source>
|
||||||
TextTrimming="CharacterEllipsis" />
|
<BitmapImage UriSource="{x:Bind Icon, Mode=OneWay}" />
|
||||||
<FontIcon
|
</Image.Source>
|
||||||
Grid.Column="2"
|
</Image>
|
||||||
Width="20"
|
<TextBlock
|
||||||
Margin="0,0,-12,0"
|
Grid.Column="1"
|
||||||
FontSize="16"
|
VerticalAlignment="Center"
|
||||||
Glyph=""
|
FontWeight="SemiBold"
|
||||||
Visibility="{x:Bind IsLocked, Converter={StaticResource BoolToInvertedVisibilityConverter}, ConverterParameter=True, Mode=OneWay}">
|
Text="{x:Bind Label, Mode=OneWay}"
|
||||||
<ToolTipService.ToolTip>
|
TextTrimming="CharacterEllipsis" />
|
||||||
<TextBlock x:Uid="GPO_IsSettingForcedText" TextWrapping="WrapWholeWords" />
|
<FontIcon
|
||||||
</ToolTipService.ToolTip>
|
Grid.Column="2"
|
||||||
</FontIcon>
|
Width="20"
|
||||||
<ToggleSwitch
|
Margin="0,0,-12,0"
|
||||||
Grid.Column="3"
|
FontSize="16"
|
||||||
Margin="0,-2,0,0"
|
Glyph=""
|
||||||
HorizontalAlignment="Right"
|
Visibility="{x:Bind IsLocked, Converter={StaticResource BoolToInvertedVisibilityConverter}, ConverterParameter=True, Mode=OneWay}">
|
||||||
IsEnabled="{x:Bind IsLocked, Converter={StaticResource BoolNegationConverter}, ConverterParameter=True, Mode=OneWay}"
|
<ToolTipService.ToolTip>
|
||||||
IsOn="{x:Bind IsEnabled, Mode=TwoWay}"
|
<TextBlock x:Uid="GPO_IsSettingForcedText" TextWrapping="WrapWholeWords" />
|
||||||
OffContent=""
|
</ToolTipService.ToolTip>
|
||||||
OnContent=""
|
</FontIcon>
|
||||||
Style="{StaticResource RightAlignedCompactToggleSwitchStyle}" />
|
<ToggleSwitch
|
||||||
</Grid>
|
Grid.Column="3"
|
||||||
|
Margin="0,-2,0,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
IsEnabled="{x:Bind IsLocked, Converter={StaticResource BoolNegationConverter}, ConverterParameter=True, Mode=OneWay}"
|
||||||
|
IsOn="{x:Bind IsEnabled, Mode=TwoWay}"
|
||||||
|
OffContent=""
|
||||||
|
OnContent=""
|
||||||
|
Style="{StaticResource RightAlignedCompactToggleSwitchStyle}" />
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<ItemsControl
|
<ItemsControl
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="16,8,16,16"
|
Margin="16,8,16,16"
|
||||||
ItemTemplateSelector="{StaticResource ModuleItemTemplateSelector}"
|
ItemTemplateSelector="{StaticResource ModuleItemTemplateSelector}"
|
||||||
ItemsSource="{x:Bind DashboardModuleItems, Mode=OneWay}"
|
ItemsSource="{x:Bind DashboardModuleItems, Mode=OneWay}"
|
||||||
Visibility="{x:Bind IsEnabled, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
|
Visibility="{x:Bind IsEnabled, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<StackPanel Spacing="4" />
|
<StackPanel Spacing="4" />
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Button>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsRepeater.ItemTemplate>
|
</ItemsRepeater.ItemTemplate>
|
||||||
</ItemsRepeater>
|
</ItemsRepeater>
|
||||||
@ -389,53 +401,62 @@
|
|||||||
</ItemsRepeater.Layout>
|
</ItemsRepeater.Layout>
|
||||||
<ItemsRepeater.ItemTemplate>
|
<ItemsRepeater.ItemTemplate>
|
||||||
<DataTemplate x:DataType="viewmodels:DashboardListItem">
|
<DataTemplate x:DataType="viewmodels:DashboardListItem">
|
||||||
<Grid
|
<Button
|
||||||
Padding="16,12"
|
Padding="0"
|
||||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
HorizontalAlignment="Stretch"
|
||||||
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
HorizontalContentAlignment="Stretch"
|
||||||
BorderThickness="1"
|
Background="Transparent"
|
||||||
CornerRadius="{StaticResource OverlayCornerRadius}"
|
BorderThickness="0"
|
||||||
RowSpacing="12">
|
Click="DashboardListItemClick"
|
||||||
<Grid ColumnSpacing="12">
|
Tag="{x:Bind Tag, Mode=OneWay}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid
|
||||||
<ColumnDefinition Width="Auto" />
|
Padding="16,12"
|
||||||
<ColumnDefinition Width="*" />
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||||
<ColumnDefinition Width="Auto" />
|
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
||||||
<ColumnDefinition Width="Auto" />
|
BorderThickness="1"
|
||||||
</Grid.ColumnDefinitions>
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
||||||
<Image Width="20">
|
RowSpacing="12">
|
||||||
<Image.Source>
|
<Grid ColumnSpacing="12">
|
||||||
<BitmapImage UriSource="{x:Bind Icon, Mode=OneWay}" />
|
<Grid.ColumnDefinitions>
|
||||||
</Image.Source>
|
<ColumnDefinition Width="Auto" />
|
||||||
</Image>
|
<ColumnDefinition Width="*" />
|
||||||
<TextBlock
|
<ColumnDefinition Width="Auto" />
|
||||||
Grid.Column="1"
|
<ColumnDefinition Width="Auto" />
|
||||||
VerticalAlignment="Center"
|
</Grid.ColumnDefinitions>
|
||||||
FontWeight="SemiBold"
|
<Image Width="20">
|
||||||
Text="{x:Bind Label, Mode=OneWay}"
|
<Image.Source>
|
||||||
TextTrimming="CharacterEllipsis" />
|
<BitmapImage UriSource="{x:Bind Icon, Mode=OneWay}" />
|
||||||
<FontIcon
|
</Image.Source>
|
||||||
Grid.Column="2"
|
</Image>
|
||||||
Width="20"
|
<TextBlock
|
||||||
Margin="0,0,-12,0"
|
Grid.Column="1"
|
||||||
FontSize="16"
|
VerticalAlignment="Center"
|
||||||
Glyph=""
|
FontWeight="SemiBold"
|
||||||
Visibility="{x:Bind IsLocked, Converter={StaticResource BoolToInvertedVisibilityConverter}, ConverterParameter=True, Mode=OneWay}">
|
Text="{x:Bind Label, Mode=OneWay}"
|
||||||
<ToolTipService.ToolTip>
|
TextTrimming="CharacterEllipsis" />
|
||||||
<TextBlock x:Uid="GPO_IsSettingForcedText" TextWrapping="WrapWholeWords" />
|
<FontIcon
|
||||||
</ToolTipService.ToolTip>
|
Grid.Column="2"
|
||||||
</FontIcon>
|
Width="20"
|
||||||
<ToggleSwitch
|
Margin="0,0,-12,0"
|
||||||
Grid.Column="3"
|
FontSize="16"
|
||||||
Margin="0,-2,0,0"
|
Glyph=""
|
||||||
HorizontalAlignment="Right"
|
Visibility="{x:Bind IsLocked, Converter={StaticResource BoolToInvertedVisibilityConverter}, ConverterParameter=True, Mode=OneWay}">
|
||||||
IsEnabled="{x:Bind IsLocked, Converter={StaticResource BoolNegationConverter}, ConverterParameter=True, Mode=OneWay}"
|
<ToolTipService.ToolTip>
|
||||||
IsOn="{x:Bind IsEnabled, Mode=TwoWay}"
|
<TextBlock x:Uid="GPO_IsSettingForcedText" TextWrapping="WrapWholeWords" />
|
||||||
OffContent=""
|
</ToolTipService.ToolTip>
|
||||||
OnContent=""
|
</FontIcon>
|
||||||
Style="{StaticResource RightAlignedCompactToggleSwitchStyle}" />
|
<ToggleSwitch
|
||||||
|
Grid.Column="3"
|
||||||
|
Margin="0,-2,0,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
IsEnabled="{x:Bind IsLocked, Converter={StaticResource BoolNegationConverter}, ConverterParameter=True, Mode=OneWay}"
|
||||||
|
IsOn="{x:Bind IsEnabled, Mode=TwoWay}"
|
||||||
|
OffContent=""
|
||||||
|
OnContent=""
|
||||||
|
Style="{StaticResource RightAlignedCompactToggleSwitchStyle}" />
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Button>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsRepeater.ItemTemplate>
|
</ItemsRepeater.ItemTemplate>
|
||||||
</ItemsRepeater>
|
</ItemsRepeater>
|
||||||
|
@ -49,5 +49,10 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
|||||||
{
|
{
|
||||||
ViewModel.SWVersionButtonClicked();
|
ViewModel.SWVersionButtonClicked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DashboardListItemClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
ViewModel.DashboardListItemClick(sender);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,17 +236,18 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<controls:SettingsExpander.Items>
|
<controls:SettingsExpander.Items>
|
||||||
<controls:SettingsCard x:Uid="General_SettingsBackupAndRestoreLocationText">
|
<controls:SettingsCard x:Uid="General_SettingsBackupAndRestoreLocationText">
|
||||||
<StackPanel
|
<Grid ColumnSpacing="8">
|
||||||
HorizontalAlignment="Right"
|
<Grid.ColumnDefinitions>
|
||||||
Orientation="Horizontal"
|
<ColumnDefinition Width="*" />
|
||||||
Spacing="8">
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="pathTextBlock"
|
x:Name="pathTextBlock"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
IsTextSelectionEnabled="True"
|
IsTextSelectionEnabled="True"
|
||||||
Text="{x:Bind Mode=TwoWay, Path=ViewModel.SettingsBackupAndRestoreDir}"
|
Text="{x:Bind Mode=TwoWay, Path=ViewModel.SettingsBackupAndRestoreDir}"
|
||||||
TextTrimming="CharacterEllipsis">
|
TextWrapping="Wrap">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip IsEnabled="{Binding ElementName=pathTextBlock, Path=IsTextTrimmed}">
|
<ToolTip IsEnabled="{Binding ElementName=pathTextBlock, Path=IsTextTrimmed}">
|
||||||
<TextBlock Text="{x:Bind Mode=TwoWay, Path=ViewModel.SettingsBackupAndRestoreDir}" />
|
<TextBlock Text="{x:Bind Mode=TwoWay, Path=ViewModel.SettingsBackupAndRestoreDir}" />
|
||||||
@ -254,6 +255,7 @@
|
|||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<Button
|
<Button
|
||||||
|
Grid.Column="1"
|
||||||
Command="{Binding SelectSettingBackupDirEventHandler}"
|
Command="{Binding SelectSettingBackupDirEventHandler}"
|
||||||
Content=""
|
Content=""
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}">
|
FontFamily="{ThemeResource SymbolThemeFontFamily}">
|
||||||
@ -263,15 +265,18 @@
|
|||||||
</ToolTip>
|
</ToolTip>
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</Grid>
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
<controls:SettingsCard
|
<controls:SettingsCard
|
||||||
x:Uid="General_SettingsBackupAndRestoreStatusInfo"
|
x:Uid="General_SettingsBackupAndRestoreStatusInfo"
|
||||||
HorizontalContentAlignment="Left"
|
HorizontalContentAlignment="Left"
|
||||||
ContentAlignment="Vertical">
|
ContentAlignment="Vertical">
|
||||||
<Grid Margin="0,0,0,6" ColumnSpacing="8">
|
<Grid
|
||||||
|
Margin="0,0,0,6"
|
||||||
|
ColumnSpacing="36"
|
||||||
|
RowSpacing="4">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" MinWidth="{StaticResource SettingActionControlMinWidth}" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@ -281,7 +286,10 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock x:Uid="General_SettingsBackupInfo_StatusHeader" />
|
<TextBlock x:Uid="General_SettingsBackupInfo_StatusHeader" />
|
||||||
<TextBlock Grid.Column="1" Foreground="{ThemeResource TextFillColorSecondaryBrush}">
|
<TextBlock
|
||||||
|
Grid.Column="1"
|
||||||
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
|
TextWrapping="WrapWholeWords">
|
||||||
<Run Text="{Binding CurrentSettingMatchText, Mode=OneWay}" />
|
<Run Text="{Binding CurrentSettingMatchText, Mode=OneWay}" />
|
||||||
<Hyperlink Click="UpdateBackupAndRestoreStatusText" TextDecorations="Underline">
|
<Hyperlink Click="UpdateBackupAndRestoreStatusText" TextDecorations="Underline">
|
||||||
<Run x:Uid="General_SettingsBackupAndRestore_LinkRefresh" />
|
<Run x:Uid="General_SettingsBackupAndRestore_LinkRefresh" />
|
||||||
@ -293,20 +301,23 @@
|
|||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
Text="{Binding LastSettingsBackupFileName, Mode=OneWay}" />
|
Text="{Binding LastSettingsBackupFileName, Mode=OneWay}"
|
||||||
|
TextWrapping="WrapWholeWords" />
|
||||||
|
|
||||||
<TextBlock x:Uid="General_SettingsBackupInfo_SourceHeader" Grid.Row="2" />
|
<TextBlock x:Uid="General_SettingsBackupInfo_SourceHeader" Grid.Row="2" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
Text="{Binding LastSettingsBackupSource, Mode=OneWay}" />
|
Text="{Binding LastSettingsBackupSource, Mode=OneWay}"
|
||||||
|
TextWrapping="WrapWholeWords" />
|
||||||
<TextBlock x:Uid="General_SettingsBackupInfo_DateHeader" Grid.Row="3" />
|
<TextBlock x:Uid="General_SettingsBackupInfo_DateHeader" Grid.Row="3" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
Text="{Binding LastSettingsBackupDate, Mode=OneWay}" />
|
Text="{Binding LastSettingsBackupDate, Mode=OneWay}"
|
||||||
|
TextWrapping="WrapWholeWords" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
</controls:SettingsExpander.Items>
|
</controls:SettingsExpander.Items>
|
||||||
|
@ -77,7 +77,6 @@
|
|||||||
AutomationProperties.AccessibilityView="Raw"
|
AutomationProperties.AccessibilityView="Raw"
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
FontSize="10"
|
FontSize="10"
|
||||||
Foreground="{ThemeResource SystemBaseMediumColor}"
|
|
||||||
Style="{ThemeResource SecondaryTextStyle}"
|
Style="{ThemeResource SecondaryTextStyle}"
|
||||||
Text=""
|
Text=""
|
||||||
Visibility="{x:Bind Path=EnableEtraBoxes, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" />
|
Visibility="{x:Bind Path=EnableEtraBoxes, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||||
@ -89,7 +88,6 @@
|
|||||||
Visibility="{x:Bind Path=EnableEtraBoxes, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" />
|
Visibility="{x:Bind Path=EnableEtraBoxes, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,0,4,0"
|
Margin="0,0,4,0"
|
||||||
Foreground="{ThemeResource SystemBaseMediumColor}"
|
|
||||||
Style="{ThemeResource SecondaryTextStyle}"
|
Style="{ThemeResource SecondaryTextStyle}"
|
||||||
Text="{x:Bind Unit, Mode=OneWay, Converter={StaticResource ImageResizerUnitToStringConverter}, ConverterParameter=ToLower}" />
|
Text="{x:Bind Unit, Mode=OneWay, Converter={StaticResource ImageResizerUnitToStringConverter}, ConverterParameter=ToLower}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -110,8 +108,8 @@
|
|||||||
<TextBlock x:Uid="EditTooltip" />
|
<TextBlock x:Uid="EditTooltip" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<Flyout x:Uid="ImageResizer_EditSize">
|
<Flyout x:Uid="ImageResizer_EditSize" ShouldConstrainToRootBounds="False">
|
||||||
<StackPanel Margin="0,12,0,0" Spacing="16">
|
<StackPanel Spacing="16">
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Uid="ImageResizer_Name"
|
x:Uid="ImageResizer_Name"
|
||||||
Width="240"
|
Width="240"
|
||||||
@ -148,7 +146,6 @@
|
|||||||
<ComboBox
|
<ComboBox
|
||||||
x:Uid="ImageResizer_Size"
|
x:Uid="ImageResizer_Size"
|
||||||
Width="240"
|
Width="240"
|
||||||
Margin="0,0,0,24"
|
|
||||||
SelectedIndex="{Binding Path=Unit, Mode=TwoWay}">
|
SelectedIndex="{Binding Path=Unit, Mode=TwoWay}">
|
||||||
<ComboBoxItem x:Uid="ImageResizer_Sizes_Units_CM" />
|
<ComboBoxItem x:Uid="ImageResizer_Sizes_Units_CM" />
|
||||||
<ComboBoxItem x:Uid="ImageResizer_Sizes_Units_Inches" />
|
<ComboBoxItem x:Uid="ImageResizer_Sizes_Units_Inches" />
|
||||||
@ -235,7 +232,7 @@
|
|||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
Style="{StaticResource SubtleButtonStyle}">
|
Style="{StaticResource SubtleButtonStyle}">
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<Flyout>
|
<Flyout ShouldConstrainToRootBounds="False">
|
||||||
<TextBlock x:Name="FileFormatTextBlock">
|
<TextBlock x:Name="FileFormatTextBlock">
|
||||||
<Run x:Uid="ImageResizer_FileFormatDescription" />
|
<Run x:Uid="ImageResizer_FileFormatDescription" />
|
||||||
<LineBreak />
|
<LineBreak />
|
||||||
|
@ -288,8 +288,8 @@
|
|||||||
<TextBlock x:Uid="EditTooltip" />
|
<TextBlock x:Uid="EditTooltip" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<Flyout x:Uid="MouseJumpThumbnailSize_Edit">
|
<Flyout x:Uid="MouseJumpThumbnailSize_Edit" ShouldConstrainToRootBounds="False">
|
||||||
<StackPanel Margin="0,12,0,0" Spacing="16">
|
<StackPanel Spacing="16">
|
||||||
<NumberBox
|
<NumberBox
|
||||||
x:Uid="MouseUtils_MouseJump_ThumbnailSize_Edit_Width"
|
x:Uid="MouseUtils_MouseJump_ThumbnailSize_Edit_Width"
|
||||||
Width="140"
|
Width="140"
|
||||||
|
@ -78,7 +78,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
IsLocked = gpo == GpoRuleConfigured.Enabled || gpo == GpoRuleConfigured.Disabled,
|
IsLocked = gpo == GpoRuleConfigured.Enabled || gpo == GpoRuleConfigured.Disabled,
|
||||||
Icon = ModuleHelper.GetModuleTypeFluentIconName(moduleType),
|
Icon = ModuleHelper.GetModuleTypeFluentIconName(moduleType),
|
||||||
EnabledChangedCallback = EnabledChangedOnUI,
|
EnabledChangedCallback = EnabledChangedOnUI,
|
||||||
AccentColor = GetModuleAccentColor(moduleType),
|
AccentColor = ModuleHelper.GetModuleAccentColor(moduleType),
|
||||||
DashboardModuleItems = GetModuleItems(moduleType),
|
DashboardModuleItems = GetModuleItems(moduleType),
|
||||||
});
|
});
|
||||||
if (moduleType == ModuleType.KeyboardManager && gpo != GpoRuleConfigured.Disabled)
|
if (moduleType == ModuleType.KeyboardManager && gpo != GpoRuleConfigured.Disabled)
|
||||||
@ -88,38 +88,6 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color GetModuleAccentColor(ModuleType moduleType)
|
|
||||||
{
|
|
||||||
return moduleType switch
|
|
||||||
{
|
|
||||||
ModuleType.AlwaysOnTop => Color.FromArgb(255, 74, 196, 242), // #4ac4f2
|
|
||||||
ModuleType.Awake => Color.FromArgb(255, 40, 177, 233), // #28b1e9
|
|
||||||
ModuleType.ColorPicker => Color.FromArgb(255, 7, 129, 211), // #0781d3
|
|
||||||
ModuleType.CropAndLock => Color.FromArgb(255, 32, 166, 228), // #20a6e4
|
|
||||||
ModuleType.EnvironmentVariables => Color.FromArgb(255, 16, 132, 208), // #1084d0
|
|
||||||
ModuleType.FancyZones => Color.FromArgb(255, 65, 209, 247), // #41d1f7
|
|
||||||
ModuleType.FileLocksmith => Color.FromArgb(255, 245, 161, 20), // #f5a114
|
|
||||||
ModuleType.FindMyMouse => Color.FromArgb(255, 104, 109, 112), // #686d70
|
|
||||||
ModuleType.Hosts => Color.FromArgb(255, 16, 132, 208), // #1084d0
|
|
||||||
ModuleType.ImageResizer => Color.FromArgb(255, 85, 207, 248), // #55cff8
|
|
||||||
ModuleType.KeyboardManager => Color.FromArgb(255, 224, 231, 238), // #e0e7ee
|
|
||||||
ModuleType.MouseHighlighter => Color.FromArgb(255, 17, 126, 199), // #117ec7
|
|
||||||
ModuleType.MouseJump => Color.FromArgb(255, 240, 240, 239), // #f0f0ef
|
|
||||||
ModuleType.MousePointerCrosshairs => Color.FromArgb(255, 25, 115, 182), // #1973b6
|
|
||||||
ModuleType.MouseWithoutBorders => Color.FromArgb(255, 31, 164, 227), // #1fa4e3
|
|
||||||
ModuleType.PastePlain => Color.FromArgb(255, 243, 156, 16), // #f39c10
|
|
||||||
ModuleType.Peek => Color.FromArgb(255, 255, 214, 103), // #ffd667
|
|
||||||
ModuleType.PowerRename => Color.FromArgb(255, 43, 186, 243), // #2bbaf3
|
|
||||||
ModuleType.PowerLauncher => Color.FromArgb(255, 51, 191, 240), // #33bff0
|
|
||||||
ModuleType.PowerAccent => Color.FromArgb(255, 84, 89, 92), // #54595c
|
|
||||||
ModuleType.RegistryPreview => Color.FromArgb(255, 17, 80, 138), // #11508a
|
|
||||||
ModuleType.MeasureTool => Color.FromArgb(255, 135, 144, 153), // #879099
|
|
||||||
ModuleType.ShortcutGuide => Color.FromArgb(255, 193, 202, 209), // #c1cad1
|
|
||||||
ModuleType.PowerOCR => Color.FromArgb(255, 24, 153, 224), // #1899e0
|
|
||||||
_ => Color.FromArgb(255, 255, 255, 255), // never called, all values listed above
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private void LoadKBMSettingsFromJson()
|
private void LoadKBMSettingsFromJson()
|
||||||
{
|
{
|
||||||
KeyboardManagerProfile kbmProfile = GetKBMProfile();
|
KeyboardManagerProfile kbmProfile = GetKBMProfile();
|
||||||
@ -528,5 +496,23 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
var actionName = "Launch";
|
var actionName = "Launch";
|
||||||
SendConfigMSG("{\"action\":{\"RegistryPreview\":{\"action_name\":\"" + actionName + "\", \"value\":\"\"}}}");
|
SendConfigMSG("{\"action\":{\"RegistryPreview\":{\"action_name\":\"" + actionName + "\", \"value\":\"\"}}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void DashboardListItemClick(object sender)
|
||||||
|
{
|
||||||
|
Button button = sender as Button;
|
||||||
|
if (button == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(button.Tag is ModuleType))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ModuleType moduleType = (ModuleType)button.Tag;
|
||||||
|
|
||||||
|
NavigationService.Navigate(ModuleHelper.GetModulePageType(moduleType));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user