-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsWindow.xaml
More file actions
240 lines (222 loc) · 15.6 KB
/
Copy pathSettingsWindow.xaml
File metadata and controls
240 lines (222 loc) · 15.6 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<Window
x:Class="Caelum.SettingsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Caelum.Controls"
Width="520"
Height="560"
MinWidth="420"
MinHeight="420"
MaxWidth="760"
MaxHeight="860"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
ResizeMode="CanResize"
WindowStyle="None"
Background="Transparent"
AllowsTransparency="True"
ShowInTaskbar="False">
<Window.Resources>
<Style x:Key="SettingsSwitchStyle" TargetType="CheckBox">
<Setter Property="Foreground" Value="{DynamicResource ThemeTextBrush}"/>
<Setter Property="FocusVisualStyle" Value="{StaticResource SettingsFocusVisualStyle}"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="MinHeight" Value="32"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Grid MinWidth="96" Height="32">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="48"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="SwitchTrack"
Width="44" Height="24"
HorizontalAlignment="Left"
VerticalAlignment="Center"
CornerRadius="12"
Background="{DynamicResource ThemeControlBrush}"
BorderBrush="{DynamicResource ThemeBorderBrush}"
BorderThickness="1.5">
<Ellipse x:Name="SwitchThumb"
Width="18" Height="18"
Margin="2"
HorizontalAlignment="Left"
Fill="{DynamicResource ThemeSubtleTextBrush}"/>
</Border>
<ContentPresenter Grid.Column="1"
Margin="8,0,0,0"
VerticalAlignment="Center"
RecognizesAccessKey="True"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="SwitchTrack" Property="Background" Value="{DynamicResource ThemeAccentBrush}"/>
<Setter TargetName="SwitchTrack" Property="BorderBrush" Value="{DynamicResource ThemeAccentBrush}"/>
<Setter TargetName="SwitchThumb" Property="HorizontalAlignment" Value="Right"/>
<Setter TargetName="SwitchThumb" Property="Fill" Value="White"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="SwitchTrack" Property="BorderBrush" Value="{DynamicResource ThemeFocusBrush}"/>
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter TargetName="SwitchTrack" Property="BorderBrush" Value="{DynamicResource ThemeFocusBrush}"/>
<Setter TargetName="SwitchTrack" Property="BorderThickness" Value="2"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Border Background="{DynamicResource ThemePaperBrush}" CornerRadius="18" Padding="24" BorderBrush="{DynamicResource ThemeBorderBrush}" BorderThickness="1">
<ScrollViewer x:Name="SettingsScrollViewer" Style="{StaticResource SleekScrollViewer}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Padding="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3"/>
<ColumnDefinition Width="14"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border x:Name="SettingsMarginRail"
Grid.Column="0"
Background="{DynamicResource ThemeMarginBrush}"
CornerRadius="2"/>
<StackPanel Grid.Column="2">
<TextBlock x:Name="TitleTextBlock" FontSize="24" FontWeight="SemiBold" Foreground="{DynamicResource ThemeTextBrush}" TextWrapping="Wrap"/>
<TextBlock x:Name="SubtitleTextBlock" Margin="0,8,0,0" FontSize="13" Foreground="{DynamicResource ThemeSubtleTextBrush}" TextWrapping="Wrap"/>
</StackPanel>
<Button Grid.Column="3"
x:Name="CloseButton"
Width="34"
Height="34"
Margin="12,0,0,0"
Click="CloseButton_Click"
Background="Transparent"
BorderThickness="0"
FocusVisualStyle="{StaticResource SettingsFocusVisualStyle}"
Cursor="Hand">
<Button.Style>
<Style TargetType="Button">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.55"/>
<Setter Property="Foreground" Value="{DynamicResource ThemeSubtleTextBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
<Button.Template>
<ControlTemplate TargetType="Button">
<Border x:Name="Root" Background="{TemplateBinding Background}" CornerRadius="10">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter TargetName="Root" Property="BorderBrush" Value="{DynamicResource ThemeFocusBrush}"/>
<Setter TargetName="Root" Property="BorderThickness" Value="2"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Root" Property="Opacity" Value="0.55"/>
<Setter Property="Foreground" Value="{DynamicResource ThemeSubtleTextBrush}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Root" Property="Background" Value="{DynamicResource ThemeControlHoverBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
<controls:LucideIcon Kind="X" Width="14" Height="14" Stroke="{DynamicResource ThemeSubtleTextBrush}"/>
</Button>
</Grid>
<StackPanel Grid.Row="1" Margin="0,22,0,0">
<Border Background="Transparent" BorderBrush="{DynamicResource ThemeBorderBrush}" BorderThickness="0,0,0,1" Padding="0,0,0,20">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock x:Name="LanguageLabelTextBlock" FontSize="15" FontWeight="SemiBold" Foreground="{DynamicResource ThemeTextBrush}" TextWrapping="Wrap"/>
<TextBlock x:Name="LanguageHintTextBlock" Grid.Row="1" Margin="0,8,0,0" FontSize="12" Foreground="{DynamicResource ThemeSubtleTextBrush}" TextWrapping="Wrap"/>
<ComboBox Grid.Row="2"
x:Name="LanguageComboBox"
Margin="0,14,0,0"
Height="36"
Style="{StaticResource ModernComboBox}"
DisplayMemberPath="DisplayName"
SelectedValuePath="Language"/>
</Grid>
</Border>
<Border Background="Transparent" BorderThickness="0" Padding="0" Margin="0,20,0,0">
<StackPanel>
<TextBlock x:Name="UtilityLabelTextBlock" FontSize="15" FontWeight="SemiBold" Foreground="{DynamicResource ThemeTextBrush}" TextWrapping="Wrap"/>
<TextBlock x:Name="UtilityHintTextBlock" Margin="0,10,0,0" FontSize="12" Foreground="{DynamicResource ThemeSubtleTextBrush}" TextWrapping="Wrap"/>
<Grid Margin="0,16,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto" MinWidth="140"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock x:Name="AutoSaveIntervalLabelTextBlock" VerticalAlignment="Center" Foreground="{DynamicResource ThemeTextBrush}" TextWrapping="Wrap" Margin="0,6"/>
<ComboBox x:Name="AutoSaveIntervalComboBox" Grid.Column="1" Height="32" Style="{StaticResource ModernComboBox}" Margin="0,3"/>
<TextBlock x:Name="PressureLabelTextBlock" Grid.Row="1" VerticalAlignment="Center" Foreground="{DynamicResource ThemeTextBrush}" TextWrapping="Wrap" Margin="0,6"/>
<CheckBox x:Name="PressureCheckBox" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center"
Style="{StaticResource SettingsSwitchStyle}"/>
<TextBlock x:Name="SmoothingLabelTextBlock" Grid.Row="2" VerticalAlignment="Center" Foreground="{DynamicResource ThemeTextBrush}" TextWrapping="Wrap" Margin="0,6"/>
<ComboBox x:Name="SmoothingComboBox" Grid.Row="2" Grid.Column="1" Height="32" Style="{StaticResource ModernComboBox}" Margin="0,3"/>
<TextBlock x:Name="ThemeLabelTextBlock" Grid.Row="3" VerticalAlignment="Center" Foreground="{DynamicResource ThemeTextBrush}" TextWrapping="Wrap" Margin="0,6"/>
<ComboBox x:Name="ThemeComboBox" Grid.Row="3" Grid.Column="1" Height="32" Style="{StaticResource ModernComboBox}" Margin="0,3"/>
<TextBlock x:Name="PerformanceModeLabelTextBlock" Grid.Row="4" VerticalAlignment="Center" Foreground="{DynamicResource ThemeTextBrush}" TextWrapping="Wrap" Margin="0,6"/>
<ComboBox x:Name="PerformanceModeComboBox" Grid.Row="4" Grid.Column="1" Height="32" Style="{StaticResource ModernComboBox}" Margin="0,3"/>
<StackPanel Grid.Row="5" VerticalAlignment="Center" Margin="0,6">
<TextBlock x:Name="WorkspaceBackdropLabelTextBlock" Foreground="{DynamicResource ThemeTextBrush}" TextWrapping="Wrap"/>
<TextBlock x:Name="WorkspaceBackdropHintTextBlock" Margin="0,2,12,0" FontSize="10" Foreground="{DynamicResource ThemeSubtleTextBrush}" TextWrapping="Wrap"/>
</StackPanel>
<ComboBox x:Name="WorkspaceBackdropComboBox" Grid.Row="5" Grid.Column="1" Height="36" Style="{StaticResource ModernComboBox}" Margin="0,5"
AutomationProperties.AutomationId="WorkspaceBackdropComboBox">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Border Width="18" Height="18" CornerRadius="5" Margin="0,0,8,0"
Background="{Binding PreviewBrush}"
BorderBrush="{DynamicResource ThemeBorderBrush}"
BorderThickness="1"/>
<TextBlock Text="{Binding DisplayName}" VerticalAlignment="Center"/>
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock x:Name="PenOnlyLabelTextBlock" Grid.Row="6" VerticalAlignment="Center" Foreground="{DynamicResource ThemeTextBrush}" TextWrapping="Wrap" Margin="0,6"/>
<CheckBox x:Name="PenOnlyCheckBox" Grid.Row="6" Grid.Column="1" VerticalAlignment="Center"
Style="{StaticResource SettingsSwitchStyle}"/>
</Grid>
</StackPanel>
</Border>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,22,0,0">
<Button x:Name="CancelButton" Click="CancelButton_Click" Style="{StaticResource DialogSecondaryButton}" Margin="0,0,10,0"/>
<Button x:Name="SaveButton" Click="SaveButton_Click" Style="{StaticResource DialogPrimaryButton}"/>
</StackPanel>
</Grid>
</ScrollViewer>
</Border>
</Window>