Skip to content

Commit a02a958

Browse files
committed
- Adjust Accent Button Style
1 parent 870c2ba commit a02a958

File tree

4 files changed

+86
-14
lines changed

4 files changed

+86
-14
lines changed

Flow.Launcher/Resources/CustomControlTemplate.xaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,6 +1642,65 @@
16421642

16431643
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="Button" />
16441644

1645+
<Style
1646+
x:Key="AccentButtonStyle"
1647+
BasedOn="{StaticResource DefaultButtonStyle}"
1648+
TargetType="Button">
1649+
<Setter Property="Foreground" Value="{DynamicResource AccentButtonForeground}" />
1650+
<Setter Property="Background" Value="{DynamicResource AccentButtonBackground}" />
1651+
<Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrush}" />
1652+
<Setter Property="Template">
1653+
<Setter.Value>
1654+
<ControlTemplate TargetType="Button">
1655+
1656+
<Border
1657+
x:Name="Background"
1658+
Background="{TemplateBinding Background}"
1659+
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
1660+
SnapsToDevicePixels="True">
1661+
<Border x:Name="Overlay">
1662+
<Border
1663+
x:Name="Border"
1664+
Margin="1"
1665+
Padding="{TemplateBinding Padding}"
1666+
BorderBrush="{TemplateBinding BorderBrush}"
1667+
BorderThickness="0 0 0 1"
1668+
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
1669+
<ContentPresenter
1670+
x:Name="ContentPresenter"
1671+
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
1672+
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
1673+
Focusable="False"
1674+
RecognizesAccessKey="True"
1675+
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
1676+
TextElement.Foreground="{TemplateBinding Foreground}" />
1677+
</Border>
1678+
</Border>
1679+
</Border>
1680+
<ControlTemplate.Triggers>
1681+
<Trigger Property="IsMouseOver" Value="True">
1682+
<Setter TargetName="Background" Property="Background" Value="{DynamicResource AccentButtonBackgroundPointerOver}" />
1683+
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushPointerOver}" />
1684+
<Setter TargetName="Overlay" Property="Background" Value="{DynamicResource AccentButtonBorderBGPointerOver}" />
1685+
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource AccentButtonForegroundPointerOver}" />
1686+
</Trigger>
1687+
<Trigger Property="IsPressed" Value="True">
1688+
<Setter TargetName="Background" Property="Background" Value="{DynamicResource AccentButtonBackgroundPressed}" />
1689+
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushPressed}" />
1690+
<Setter TargetName="Overlay" Property="Background" Value="{DynamicResource AccentButtonBorderBGPressed}" />
1691+
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource AccentButtonForegroundPressed}" />
1692+
</Trigger>
1693+
<Trigger Property="IsEnabled" Value="False">
1694+
<Setter TargetName="Background" Property="Background" Value="{DynamicResource AccentButtonBackgroundDisabled}" />
1695+
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushDisabled}" />
1696+
<Setter TargetName="Overlay" Property="Background" Value="transparent" />
1697+
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource AccentButtonForegroundDisabled}" />
1698+
</Trigger>
1699+
</ControlTemplate.Triggers>
1700+
</ControlTemplate>
1701+
</Setter.Value>
1702+
</Setter>
1703+
</Style>
16451704

16461705
<!-- - Custom Toggle Switch from modern wpf for left label -->
16471706
<system:TimeSpan x:Key="RepositionDelay">0:0:0.033</system:TimeSpan>

Flow.Launcher/Resources/Dark.xaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,18 +1605,23 @@
16051605

16061606
<!-- Resources for AccentButtonStyle -->
16071607
<m:StaticResource x:Key="AccentButtonBackground" ResourceKey="SystemAccentColorLight2Brush" />
1608-
<m:StaticResource x:Key="AccentButtonBackgroundPointerOver" ResourceKey="SystemAccentColorLight1Brush" />
1609-
<m:StaticResource x:Key="AccentButtonBackgroundPressed" ResourceKey="SystemAccentColorDark1Brush" />
1608+
<m:StaticResource x:Key="AccentButtonBackgroundPointerOver" ResourceKey="SystemAccentColorLight2Brush" />
1609+
<m:StaticResource x:Key="AccentButtonBackgroundPressed" ResourceKey="SystemAccentColorLight2Brush" />
16101610
<m:StaticResource x:Key="AccentButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
1611-
<m:StaticResource x:Key="AccentButtonForeground" ResourceKey="Color01B" />
1612-
<m:StaticResource x:Key="AccentButtonForegroundPointerOver" ResourceKey="Color01B" />
1613-
<m:StaticResource x:Key="AccentButtonForegroundPressed" ResourceKey="Color23B" />
1611+
<m:StaticResource x:Key="AccentButtonForeground" ResourceKey="SystemControlForegroundAltHighBrush" />
1612+
<m:StaticResource x:Key="AccentButtonForegroundPointerOver" ResourceKey="SystemControlForegroundAltMediumHighBrush" />
1613+
<m:StaticResource x:Key="AccentButtonForegroundPressed" ResourceKey="SystemControlForegroundListLowBrush" />
16141614
<m:StaticResource x:Key="AccentButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
16151615
<m:StaticResource x:Key="AccentButtonBorderBrush" ResourceKey="SystemControlForegroundTransparentBrush" />
16161616
<m:StaticResource x:Key="AccentButtonBorderBrushPointerOver" ResourceKey="SystemControlForegroundTransparentBrush" />
16171617
<m:StaticResource x:Key="AccentButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
1618+
<m:StaticResource x:Key="AccentButtonBorderBGPointerOver" ResourceKey="AccentButtonOverlayPointerOver" />
1619+
<m:StaticResource x:Key="AccentButtonBorderBGPressed" ResourceKey="AccentButtonOverlayPressed" />
16181620
<m:StaticResource x:Key="AccentButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
16191621

1622+
<SolidColorBrush x:Key="AccentButtonOverlayPointerOver" Color="#32555555" />
1623+
<SolidColorBrush x:Key="AccentButtonOverlayPressed" Color="#52555555" />
1624+
16201625
<sys:Boolean x:Key="UseSystemFocusVisuals">True</sys:Boolean>
16211626
<sys:Boolean x:Key="IsApplicationFocusVisualKindReveal">False</sys:Boolean>
16221627

Flow.Launcher/Resources/Light.xaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,9 +1608,11 @@
16081608
<m:StaticResource x:Key="AccentButtonForegroundPointerOver" ResourceKey="SystemControlForegroundChromeWhiteBrush" />
16091609
<m:StaticResource x:Key="AccentButtonForegroundPressed" ResourceKey="SystemControlForegroundChromeWhiteBrush" />
16101610
<m:StaticResource x:Key="AccentButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
1611-
<m:StaticResource x:Key="AccentButtonBorderBrush" ResourceKey="SystemControlForegroundTransparentBrush" />
1612-
<m:StaticResource x:Key="AccentButtonBorderBrushPointerOver" ResourceKey="SystemControlForegroundTransparentBrush" />
1611+
<m:StaticResource x:Key="AccentButtonBorderBrush" ResourceKey="SystemAccentColorDark2Brush" />
1612+
<m:StaticResource x:Key="AccentButtonBorderBrushPointerOver" ResourceKey="SystemAccentColorDark2Brush" />
16131613
<m:StaticResource x:Key="AccentButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
1614+
<m:StaticResource x:Key="AccentButtonBorderBGPointerOver" ResourceKey="SystemControlForegroundTransparentBrush" />
1615+
<m:StaticResource x:Key="AccentButtonBorderBGPressed" ResourceKey="SystemControlForegroundTransparentBrush" />
16141616
<m:StaticResource x:Key="AccentButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
16151617

16161618
<sys:Boolean x:Key="UseSystemFocusVisuals">True</sys:Boolean>

Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,39 +43,45 @@
4343
TextDecorations="None">
4444
<TextBlock
4545
Padding="10 5"
46-
Foreground="White"
46+
Foreground="{StaticResource SystemControlForegroundAltHighBrush}"
4747
Text="{DynamicResource BecomeASponsor}" />
4848
</Hyperlink>
4949
</Button>
5050
</StackPanel>
5151
</cc:Card>
5252

5353
<cc:Card Title="{DynamicResource releaseNotes}" Icon="&#xe8fd;">
54-
<cc:HyperLink Uri="{Binding ReleaseNotes}" Text="{DynamicResource releaseNotes}" />
54+
<cc:HyperLink Text="{DynamicResource releaseNotes}" Uri="{Binding ReleaseNotes}" />
5555
</cc:Card>
5656

5757
<cc:Card
5858
Title="{DynamicResource website}"
5959
Margin="0 14 0 0"
6060
Icon="&#xeb41;">
6161
<StackPanel Orientation="Horizontal">
62-
<cc:HyperLink Margin="0 0 12 0" Uri="{Binding Website}" Text="{DynamicResource website}" />
63-
<cc:HyperLink Uri="{Binding Github}" Text="{DynamicResource github}" />
62+
<cc:HyperLink
63+
Margin="0 0 12 0"
64+
Text="{DynamicResource website}"
65+
Uri="{Binding Website}" />
66+
<cc:HyperLink Text="{DynamicResource github}" Uri="{Binding Github}" />
6467
</StackPanel>
6568
</cc:Card>
6669

6770
<cc:Card Title="{DynamicResource documentation}" Icon="&#xe82f;">
6871
<StackPanel Orientation="Horizontal">
69-
<cc:HyperLink Margin="0 0 12 0" Uri="{Binding Documentation}" Text="{DynamicResource documentation}" />
70-
<cc:HyperLink Uri="{Binding Website}" Text="{DynamicResource website}" />
72+
<cc:HyperLink
73+
Margin="0 0 12 0"
74+
Text="{DynamicResource documentation}"
75+
Uri="{Binding Documentation}" />
76+
<cc:HyperLink Text="{DynamicResource website}" Uri="{Binding Website}" />
7177
</StackPanel>
7278
</cc:Card>
7379

7480
<cc:Card
7581
Title="{DynamicResource icons}"
7682
Margin="0 14 0 0"
7783
Icon="&#xE8FE;">
78-
<cc:HyperLink Uri="https://icons8.com/" Text="icons8.com" />
84+
<cc:HyperLink Text="icons8.com" Uri="https://icons8.com/" />
7985
</cc:Card>
8086

8187
<cc:Card Title="{DynamicResource devtool}" Icon="&#xf12b;">

0 commit comments

Comments
 (0)