Repository navigation
Expand file tree
/
Copy pathApp.xaml
More file actions
166 lines (156 loc) · 9.16 KB
/
Copy pathApp.xaml
File metadata and controls
166 lines (156 loc) · 9.16 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
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
<Application x:Class="MultronUpdater.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
ShutdownMode="OnExplicitShutdown">
<Application.Resources>
<SolidColorBrush x:Key="AccentBrush" Color="#2EA043"/>
<SolidColorBrush x:Key="AccentDarkBrush" Color="#1A7F37"/>
<SolidColorBrush x:Key="BgBrush" Color="#F3F5F7"/>
<SolidColorBrush x:Key="CardBrush" Color="#FFFFFF"/>
<SolidColorBrush x:Key="BorderBrush" Color="#D9DEE3"/>
<SolidColorBrush x:Key="TextBrush" Color="#1F2328"/>
<SolidColorBrush x:Key="MutedBrush" Color="#656D76"/>
<SolidColorBrush x:Key="HeaderBrush" Color="#161B22"/>
<Style x:Key="Card" TargetType="Border">
<Setter Property="Background" Value="{StaticResource CardBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="16,14"/>
<Setter Property="Margin" Value="0,0,0,12"/>
</Style>
<Style x:Key="CardTitle" TargetType="TextBlock">
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="Margin" Value="0,0,0,10"/>
</Style>
<Style x:Key="FieldLabel" TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource MutedBrush}"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Margin" Value="0,6,0,3"/>
</Style>
<Style x:Key="Hint" TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource MutedBrush}"/>
<Setter Property="FontSize" Value="11.5"/>
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="Margin" Value="0,3,0,0"/>
</Style>
<Style TargetType="TextBox">
<Setter Property="Padding" Value="7,5"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style TargetType="PasswordBox">
<Setter Property="Padding" Value="7,5"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style TargetType="CheckBox">
<Setter Property="Margin" Value="0,5,0,0"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style x:Key="BtnBase" TargetType="Button">
<Setter Property="Padding" Value="14,7"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Background" Value="#F6F8FA"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="b" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1" CornerRadius="6" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="b" Property="Opacity" Value="0.85"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="b" Property="Opacity" Value="0.7"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="b" Property="Opacity" Value="0.45"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button" BasedOn="{StaticResource BtnBase}"/>
<Style x:Key="PrimaryButton" TargetType="Button" BasedOn="{StaticResource BtnBase}">
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource AccentDarkBrush}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style x:Key="ToggleSwitch" TargetType="CheckBox">
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<StackPanel Orientation="Horizontal" Background="Transparent">
<Grid Width="44" Height="24" VerticalAlignment="Center">
<Border x:Name="track" CornerRadius="12" Background="#C9D1D9"/>
<Ellipse x:Name="knob" Width="18" Height="18" Fill="White" HorizontalAlignment="Left" Margin="3,0,0,0">
<Ellipse.RenderTransform>
<TranslateTransform x:Name="knobX" X="0"/>
</Ellipse.RenderTransform>
</Ellipse>
</Grid>
<ContentPresenter Margin="10,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="track" Property="Background" Value="{StaticResource AccentBrush}"/>
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="knobX" Storyboard.TargetProperty="X" To="20" Duration="0:0:0.15"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="knobX" Storyboard.TargetProperty="X" To="0" Duration="0:0:0.15"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TabItem">
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border x:Name="b" Padding="16,9" Margin="0,0,4,0" BorderThickness="0,0,0,2" BorderBrush="Transparent" Background="Transparent">
<ContentPresenter x:Name="c" ContentSource="Header" TextElement.FontSize="13.5" TextElement.Foreground="{StaticResource MutedBrush}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="b" Property="BorderBrush" Value="{StaticResource AccentBrush}"/>
<Setter TargetName="c" Property="TextElement.Foreground" Value="{StaticResource TextBrush}"/>
<Setter TargetName="c" Property="TextElement.FontWeight" Value="SemiBold"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="c" Property="TextElement.Foreground" Value="{StaticResource TextBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>