-
Notifications
You must be signed in to change notification settings - Fork 223
/
dark.xaml
179 lines (172 loc) · 10.4 KB
/
dark.xaml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="labelStyleCommon" TargetType="Label">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="checkBoxStyleCommon" TargetType="CheckBox">
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Margin" Value="0,86,0,0" />
</Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Foreground" Value="#757473" />
<Setter Property="Background" Value="#00000000" />
<Setter Property="FontFamily" Value="Segoe Fluent Icons" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="buttonBorder" Background="{TemplateBinding Background}"
BorderThickness="0.0" BorderBrush="Transparent">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="#5593FE" TargetName="buttonBorder" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#F5C2E7" />
<Setter Property="Foreground" Value="#1E1E2E" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#585B70" />
<Setter Property="Foreground" Value="#11111b" />
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style TargetType="Label" BasedOn="{StaticResource labelStyleCommon}">
<Setter Property="Foreground" Value="White" />
</Style>
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" StrokeDashArray="1 2"
Stroke="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"
SnapsToDevicePixels="true" StrokeThickness="1" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="OptionMarkFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="14,0,0,0" StrokeDashArray="1 2"
Stroke="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"
SnapsToDevicePixels="true" StrokeThickness="1" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<SolidColorBrush x:Key="OptionMark.Static.Background" Color="Transparent" />
<SolidColorBrush x:Key="OptionMark.Static.Border" Color="#585B70" />
<SolidColorBrush x:Key="OptionMark.Static.Glyph" Color="#F5C2E7" />
<SolidColorBrush x:Key="OptionMark.MouseOver.Background" Color="Transparent" />
<SolidColorBrush x:Key="OptionMark.MouseOver.Border" Color="#89B4FA" />
<SolidColorBrush x:Key="OptionMark.MouseOver.Glyph" Color="#f9c5eb" />
<SolidColorBrush x:Key="OptionMark.Pressed.Background" Color="Transparent" />
<SolidColorBrush x:Key="OptionMark.Pressed.Border" Color="#89B4FA" />
<SolidColorBrush x:Key="OptionMark.Pressed.Glyph" Color="#b791ad" />
<SolidColorBrush x:Key="OptionMark.Disabled.Background" Color="#585B70" />
<SolidColorBrush x:Key="OptionMark.Disabled.Foreground" Color="black" />
<SolidColorBrush x:Key="OptionMark.Disabled.Border" Color="Transparent" />
<SolidColorBrush x:Key="OptionMark.Disabled.Glyph" Color="#FF64505E" />
<Style TargetType="{x:Type CheckBox}" BasedOn="{StaticResource checkBoxStyleCommon}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
<Setter Property="Background" Value="{StaticResource OptionMark.Static.Background}" />
<Setter Property="BorderBrush" Value="{StaticResource OptionMark.Static.Border}" />
<Setter Property="Foreground" Value="#CDD6F4" />
<Setter Property="BorderThickness" Value="1.3" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="checkBoxBorder" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="1"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Grid x:Name="markGrid">
<Path x:Name="optionMark"
Data="F1 M 9.97498,1.22334L 4.6983,9.09834L 4.52164,9.09834L 0,5.19331L 1.27664,3.52165L 4.255,6.08833L 8.33331,1.52588e-005L 9.97498,1.22334 Z "
Fill="{StaticResource OptionMark.Static.Glyph}" Margin="1"
Opacity="0" Stretch="None" />
<Rectangle x:Name="indeterminateMark"
Fill="{StaticResource OptionMark.Static.Glyph}" Margin="2"
Opacity="0" />
</Grid>
</Border>
<ContentPresenter x:Name="contentPresenter" Grid.Column="1"
Focusable="False"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}" RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasContent" Value="true">
<Setter Property="FocusVisualStyle"
Value="{StaticResource OptionMarkFocusVisual}" />
<Setter Property="Padding" Value="4, -1, 10, 0" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="checkBoxBorder"
Value="{StaticResource OptionMark.MouseOver.Background}" />
<Setter Property="BorderBrush" TargetName="checkBoxBorder"
Value="{StaticResource OptionMark.MouseOver.Border}" />
<Setter Property="Fill" TargetName="optionMark"
Value="{StaticResource OptionMark.MouseOver.Glyph}" />
<Setter Property="Fill" TargetName="indeterminateMark"
Value="{StaticResource OptionMark.MouseOver.Glyph}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="checkBoxBorder"
Value="{StaticResource OptionMark.Disabled.Background}" />
<Setter Property="BorderBrush" TargetName="checkBoxBorder"
Value="{StaticResource OptionMark.Disabled.Border}" />
<Setter Property="Fill" TargetName="optionMark"
Value="{StaticResource OptionMark.Disabled.Glyph}" />
<Setter Property="Fill" TargetName="indeterminateMark"
Value="{StaticResource OptionMark.Disabled.Glyph}" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="checkBoxBorder"
Value="{StaticResource OptionMark.Pressed.Background}" />
<Setter Property="BorderBrush" TargetName="checkBoxBorder"
Value="{StaticResource OptionMark.Pressed.Border}" />
<Setter Property="Fill" TargetName="optionMark"
Value="{StaticResource OptionMark.Pressed.Glyph}" />
<Setter Property="Fill" TargetName="indeterminateMark"
Value="{StaticResource OptionMark.Pressed.Glyph}" />
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Opacity" TargetName="optionMark" Value="1" />
<Setter Property="Opacity" TargetName="indeterminateMark" Value="0" />
</Trigger>
<Trigger Property="IsChecked" Value="{x:Null}">
<Setter Property="Opacity" TargetName="optionMark" Value="0" />
<Setter Property="Opacity" TargetName="indeterminateMark" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>