-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.xaml
More file actions
364 lines (343 loc) · 23.6 KB
/
Copy pathApp.xaml
File metadata and controls
364 lines (343 loc) · 23.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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<Application x:Class="Klyr.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:views="clr-namespace:Klyr.Views"
StartupUri="Views/SplashScreen.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles/Icons.xaml"/>
<ResourceDictionary Source="Styles/Animations.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!-- v2.3.0 — Convertisseurs en portée GLOBALE (app).
Avant ils étaient ajoutés au runtime dans MainWindow.Resources, donc
invisibles depuis les UserControls (DiskAnalyzerView → XamlParseException
sur {StaticResource PercentToStarConverter}). Ici ils sont accessibles partout. -->
<views:PageVisibilityConverter x:Key="PageVisibilityConverter"/>
<views:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
<views:InverseBoolConverter x:Key="InverseBoolConverter"/>
<views:PercentToWidthConverter x:Key="PercentToWidthConverter"/>
<views:PercentToStarConverter x:Key="PercentToStarConverter"/>
<views:AdminBadgeVisibilityConverter x:Key="AdminBadgeVisibilityConverter"/>
<views:ScoreToArcConverter x:Key="ScoreToArcConverter"/>
<views:NavActiveBgConverter x:Key="NavActiveBgConverter"/>
<views:NavActiveFgConverter x:Key="NavActiveFgConverter"/>
<!-- ═══════════════════════════════════════════════════════════
PALETTE – Dark sobre, accent bleu ardoise
Inspiré de VS Code / Windows Settings / Notion dark
═══════════════════════════════════════════════════════════ -->
<!-- Fonds -->
<SolidColorBrush x:Key="BackgroundDeepBrush" Color="#141414"/>
<SolidColorBrush x:Key="BackgroundPanelBrush" Color="#1C1C1C"/>
<SolidColorBrush x:Key="BackgroundCardBrush" Color="#242424"/>
<SolidColorBrush x:Key="BackgroundHoverBrush" Color="#2A2A2A"/>
<SolidColorBrush x:Key="BackgroundFooterBrush" Color="#181818"/>
<SolidColorBrush x:Key="BackgroundPressedBrush" Color="#333333"/>
<!-- Accent unique : bleu ardoise discret -->
<SolidColorBrush x:Key="AccentBrush" Color="#4B8BF5"/>
<SolidColorBrush x:Key="AccentHoverBrush" Color="#6BA0F7"/>
<SolidColorBrush x:Key="AccentPressedBrush" Color="#3A72D4"/>
<SolidColorBrush x:Key="AccentSubtleBrush" Color="#1E2E4A"/>
<!-- Sémantique -->
<SolidColorBrush x:Key="SuccessBrush" Color="#4CAF50"/>
<SolidColorBrush x:Key="WarningBrush" Color="#E8A838"/>
<SolidColorBrush x:Key="ErrorBrush" Color="#E05252"/>
<SolidColorBrush x:Key="InfoBrush" Color="#4B8BF5"/>
<!-- Texte -->
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#E8E8E8"/>
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#8A8A8A"/>
<SolidColorBrush x:Key="TextMutedBrush" Color="#484848"/>
<SolidColorBrush x:Key="TextTertiaryBrush" Color="#606060"/>
<SolidColorBrush x:Key="TextEmphasizedBrush" Color="#C8C8C8"/>
<SolidColorBrush x:Key="TextDescriptionBrush" Color="#6A6A6A"/>
<SolidColorBrush x:Key="TextOnAccentBrush" Color="#FFFFFF"/>
<!-- Bordures -->
<SolidColorBrush x:Key="BorderBrush" Color="#2E2E2E"/>
<SolidColorBrush x:Key="BorderFocusBrush" Color="#4B8BF5"/>
<SolidColorBrush x:Key="BorderLightBrush" Color="#3A3A3A"/>
<!-- Terminal -->
<SolidColorBrush x:Key="TerminalBgBrush" Color="#0F0F0F"/>
<SolidColorBrush x:Key="TerminalTextBrush" Color="#A8C878"/>
<!-- Sections status (subtles + borders) -->
<SolidColorBrush x:Key="StatusSuccessSubtleBgBrush" Color="#1E241E"/>
<SolidColorBrush x:Key="StatusInfoSubtleBgBrush" Color="#1A1E28"/>
<SolidColorBrush x:Key="StatusWarningSubtleBgBrush" Color="#221E18"/>
<SolidColorBrush x:Key="StatusSuccessBorderBrush" Color="#2E3E2E"/>
<SolidColorBrush x:Key="StatusInfoBorderBrush" Color="#2A3040"/>
<SolidColorBrush x:Key="StatusWarningBorderBrush" Color="#3A3020"/>
<SolidColorBrush x:Key="StatusLiveSuccessBgBrush" Color="#1E2E1E"/>
<SolidColorBrush x:Key="StatusLiveSuccessBorderBrush" Color="#2E4A2E"/>
<!-- Badges (Admin / Reboot / Advanced / Security) -->
<SolidColorBrush x:Key="BadgeAdminBgBrush" Color="#1E2834"/>
<SolidColorBrush x:Key="BadgeAdminTextBrush" Color="#6A9FD8"/>
<SolidColorBrush x:Key="BadgeRebootBgBrush" Color="#2A1E1E"/>
<SolidColorBrush x:Key="BadgeRebootTextBrush" Color="#C06060"/>
<SolidColorBrush x:Key="BadgeAdvancedBgBrush" Color="#3A2A1E"/>
<SolidColorBrush x:Key="BadgeAdvancedTextBrush" Color="#D0A46A"/>
<SolidColorBrush x:Key="BadgeSecurityBgBrush" Color="#3A1F2A"/>
<SolidColorBrush x:Key="BadgeSecurityTextBrush" Color="#D07AA0"/>
<!-- Contrôles (scrollbar / toggle) -->
<SolidColorBrush x:Key="ScrollBarThumbBrush" Color="#383838"/>
<SolidColorBrush x:Key="ScrollBarThumbHoverBrush" Color="#505050"/>
<SolidColorBrush x:Key="ToggleThumbBrush" Color="#606060"/>
<!-- ═══════════════════════════════════════════════════════════
SCROLLBAR
═══════════════════════════════════════════════════════════ -->
<Style x:Key="ScrollBarThumbStyle" TargetType="Thumb">
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<Border Background="{TemplateBinding Background}" CornerRadius="3"/>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbHoverBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="ScrollBar">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Width" Value="5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
<Grid Background="Transparent">
<Track Name="PART_Track" IsDirectionReversed="True">
<Track.Thumb>
<Thumb Style="{StaticResource ScrollBarThumbStyle}"/>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ScrollViewer">
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="HorizontalScrollBarVisibility" Value="Disabled"/>
</Style>
<!-- ═══════════════════════════════════════════════════════════
BOUTON PRINCIPAL
═══════════════════════════════════════════════════════════ -->
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource AccentBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource TextOnAccentBrush}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Padding" Value="16,8"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="bd" Background="{TemplateBinding Background}"
CornerRadius="5" Padding="{TemplateBinding Padding}"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<ScaleTransform x:Name="bdScale"/>
</Border.RenderTransform>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="Background" Value="{DynamicResource AccentHoverBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="bd" Property="Background" Value="{DynamicResource AccentPressedBrush}"/>
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="bdScale"
Storyboard.TargetProperty="ScaleX"
To="0.97" Duration="0:0:0.08"/>
<DoubleAnimation Storyboard.TargetName="bdScale"
Storyboard.TargetProperty="ScaleY"
To="0.97" Duration="0:0:0.08"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="bdScale"
Storyboard.TargetProperty="ScaleX"
To="1.0" Duration="0:0:0.12"/>
<DoubleAnimation Storyboard.TargetName="bdScale"
Storyboard.TargetProperty="ScaleY"
To="1.0" Duration="0:0:0.12"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="bd" Property="Background" Value="{DynamicResource BackgroundHoverBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource TextMutedBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ═══════════════════════════════════════════════════════════
BOUTON SECONDAIRE
═══════════════════════════════════════════════════════════ -->
<Style x:Key="SecondaryButtonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Padding" Value="16,8"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="bd"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5" Padding="{TemplateBinding Padding}"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<ScaleTransform x:Name="bdScale"/>
</Border.RenderTransform>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="Background" Value="{DynamicResource BackgroundHoverBrush}"/>
<Setter TargetName="bd" Property="BorderBrush" Value="{DynamicResource BorderFocusBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="bd" Property="Background" Value="{DynamicResource BackgroundPressedBrush}"/>
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="bdScale"
Storyboard.TargetProperty="ScaleX"
To="0.97" Duration="0:0:0.08"/>
<DoubleAnimation Storyboard.TargetName="bdScale"
Storyboard.TargetProperty="ScaleY"
To="0.97" Duration="0:0:0.08"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="bdScale"
Storyboard.TargetProperty="ScaleX"
To="1.0" Duration="0:0:0.12"/>
<DoubleAnimation Storyboard.TargetName="bdScale"
Storyboard.TargetProperty="ScaleY"
To="1.0" Duration="0:0:0.12"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ═══════════════════════════════════════════════════════════
BOUTON NAV SIDEBAR
═══════════════════════════════════════════════════════════ -->
<Style x:Key="NavButtonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="Padding" Value="12,10"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="bd" Background="{TemplateBinding Background}"
CornerRadius="6" Padding="{TemplateBinding Padding}">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="Background" Value="{DynamicResource BackgroundHoverBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="bd" Property="Background" Value="{DynamicResource BackgroundHoverBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ═══════════════════════════════════════════════════════════
CARTE OPTIMISATION
═══════════════════════════════════════════════════════════ -->
<Style x:Key="OptimizationCardStyle" TargetType="Border">
<Setter Property="Background" Value="{DynamicResource BackgroundCardBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="16"/>
<Setter Property="Margin" Value="0,0,0,6"/>
</Style>
<!-- ═══════════════════════════════════════════════════════════
TOGGLE SWITCH
═══════════════════════════════════════════════════════════ -->
<Style x:Key="ToggleStyle" TargetType="CheckBox">
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Border x:Name="track" Width="40" Height="22"
CornerRadius="11"
Background="{DynamicResource BorderBrush}"
BorderBrush="{DynamicResource BorderLightBrush}"
BorderThickness="1">
<Border x:Name="thumb" Width="16" Height="16"
CornerRadius="8"
Background="{DynamicResource ToggleThumbBrush}"
HorizontalAlignment="Left"
Margin="3,0,0,0"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="track" Property="Background" Value="{DynamicResource AccentSubtleBrush}"/>
<Setter TargetName="track" Property="BorderBrush" Value="{DynamicResource AccentBrush}"/>
<Setter TargetName="thumb" Property="Background" Value="{DynamicResource AccentBrush}"/>
<Setter TargetName="thumb" Property="HorizontalAlignment" Value="Right"/>
<Setter TargetName="thumb" Property="Margin" Value="0,0,3,0"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="track" Property="BorderBrush" Value="{DynamicResource ScrollBarThumbHoverBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ═══════════════════════════════════════════════════════════
TERMINAL
═══════════════════════════════════════════════════════════ -->
<Style x:Key="TerminalTextStyle" TargetType="TextBox">
<Setter Property="Background" Value="{DynamicResource TerminalBgBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource TerminalTextBrush}"/>
<Setter Property="FontFamily" Value="Consolas"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="Padding" Value="12"/>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>