-
-
Notifications
You must be signed in to change notification settings - Fork 595
Expand file tree
/
Copy pathDocsHelpButtonStyles.axaml
More file actions
61 lines (54 loc) · 2.76 KB
/
Copy pathDocsHelpButtonStyles.axaml
File metadata and controls
61 lines (54 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls"
xmlns:icons="https://github.com/projektanker/icons.avalonia"
xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages">
<Design.PreviewWith>
<StackPanel
Margin="8"
Orientation="Horizontal"
Spacing="6">
<controls:DocsHelpButton DocsPath="README.md" />
<controls:DocsHelpButton DocsPath="README.md" IsEnabled="False" />
</StackPanel>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type controls:DocsHelpButton}" TargetType="controls:DocsHelpButton">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="6" />
<Setter Property="CornerRadius" Value="4" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}" />
<Setter Property="ToolTip.Tip" Value="{x:Static lang:Resources.Label_ViewDocumentation}" />
<Setter Property="AutomationProperties.Name" Value="{x:Static lang:Resources.Label_ViewDocumentation}" />
<Setter Property="Template">
<ControlTemplate>
<Border
Name="Root"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
CornerRadius="{TemplateBinding CornerRadius}">
<!-- Matches the FontAwesome help glyphs used elsewhere in the app -->
<icons:Icon
FontSize="16"
Foreground="{TemplateBinding Foreground}"
Value="fa-solid fa-circle-question" />
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:pointerover">
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
<Setter Property="Background" Value="{DynamicResource SubtleFillColorSecondaryBrush}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}" />
<Setter Property="Background" Value="{DynamicResource SubtleFillColorTertiaryBrush}" />
</Style>
<Style Selector="^:disabled">
<Setter Property="Foreground" Value="{DynamicResource TextFillColorDisabledBrush}" />
<Setter Property="Background" Value="Transparent" />
</Style>
</ControlTheme>
</ResourceDictionary>