-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathApp.xaml
More file actions
184 lines (178 loc) · 12.4 KB
/
App.xaml
File metadata and controls
184 lines (178 loc) · 12.4 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<Application x:Class="LinuxGate.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:LinuxGate"
xmlns:converters="clr-namespace:LinuxGate.Converters"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- Styles dictionary -->
<ResourceDictionary>
<!-- Effects -->
<DropShadowEffect x:Key="DropShadowEffect"
ShadowDepth="1"
Direction="270"
Color="#000000"
Opacity="0.2"
BlurRadius="4"/>
<Style x:Key="ModernButton" TargetType="Button">
<Setter Property="Background" Value="#2a273f"/>
<Setter Property="Foreground" Value="#E0DEF4"/>
<Setter Property="Padding" Value="20,10"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="8"
BorderThickness="0"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#3e8fb0"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#2d7a9e"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Color Resources -->
<SolidColorBrush x:Key="PrimaryBackground" Color="#232136"/>
<SolidColorBrush x:Key="SecondaryBackground" Color="#2a273f"/>
<SolidColorBrush x:Key="AccentColor" Color="#3e8fb0"/>
<SolidColorBrush x:Key="TextPrimary" Color="#e0def4"/>
<SolidColorBrush x:Key="TextSecondary" Color="#908caa"/>
<SolidColorBrush x:Key="ErrorColor" Color="#eb6f92"/>
<!-- Converters -->
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
<converters:ScaleConverter x:Key="ScaleConverter"/>
<converters:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>
<converters:InverseBoolConverter x:Key="InverseBoolConverter"/>
<converters:VisibilityToBoolConverter x:Key="VisibilityToBoolConverter"/>
<!-- ComboBox Style -->
<Style x:Key="ModernComboBox" TargetType="ComboBox">
<Setter Property="Background" Value="#2a273f"/>
<Setter Property="Foreground" Value="#E0DEF4"/>
<Setter Property="BorderBrush" Value="#363252"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Height" Value="36"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid>
<ToggleButton x:Name="ToggleButton"
BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1"
CornerRadius="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<ContentPresenter Grid.Column="0"
Margin="10,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center">
<ContentPresenter.Content>
<TextBlock Text="{Binding SelectedItem.Content, RelativeSource={RelativeSource AncestorType=ComboBox}}"
Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=ComboBox}}"/>
</ContentPresenter.Content>
</ContentPresenter>
<Path Grid.Column="1"
Data="M0,0 L8,8 L16,0"
Stroke="#908caa"
StrokeThickness="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="#3e8fb0"/>
<Setter TargetName="Border" Property="Background" Value="#363252"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="BorderBrush" Value="#3e8fb0"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<Popup IsOpen="{TemplateBinding IsDropDownOpen}"
Placement="Bottom"
PlacementTarget="{Binding ElementName=ToggleButton}"
Width="{TemplateBinding ActualWidth}"
AllowsTransparency="True">
<Border Background="#2a273f"
BorderBrush="#363252"
BorderThickness="1"
CornerRadius="4"
Effect="{StaticResource DropShadowEffect}"
Margin="0,4,0,0">
<ScrollViewer MaxHeight="200"
VerticalScrollBarVisibility="Auto"
Background="Transparent">
<StackPanel IsItemsHost="True"
Background="Transparent"
Margin="0,2"/>
</ScrollViewer>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ModernComboBoxItem" TargetType="ComboBoxItem">
<Setter Property="Height" Value="32"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="#E0DEF4"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border x:Name="Border"
Background="{TemplateBinding Background}"
Margin="2,1"
CornerRadius="2">
<ContentPresenter Margin="8,0"
VerticalAlignment="Center"
HorizontalAlignment="Left"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#3e8fb0"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#3e8fb0"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
<!-- Default language (English) -->
<ResourceDictionary Source="pack://application:,,,/Resources/Lang/Strings.en.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>