Skip to content

Commit f0889c7

Browse files
committed
Code cleanup
1 parent 036c744 commit f0889c7

5 files changed

Lines changed: 98 additions & 99 deletions

File tree

FileDiff/AppSettings.cs

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -219,27 +219,27 @@ public static Brush FolderFullMatchBackground
219219
}
220220
}
221221

222-
public static Brush FolderPartialMatchForeground
222+
public static Brush FolderNewForeground
223223
{
224224
get;
225225
set
226226
{
227227
field = value;
228228
field.Freeze();
229-
CurrentTheme.FolderPartialMatchForeground = ((SolidColorBrush)value).Color.ToString();
230-
NotifyStaticPropertyChanged(nameof(FolderPartialMatchForeground));
229+
CurrentTheme.FolderNewForeground = ((SolidColorBrush)value).Color.ToString();
230+
NotifyStaticPropertyChanged(nameof(FolderNewForeground));
231231
}
232232
}
233233

234-
public static Brush FolderPartialMatchBackground
234+
public static Brush FolderNewBackground
235235
{
236236
get;
237237
set
238238
{
239239
field = value;
240240
field.Freeze();
241-
CurrentTheme.FolderPartialMatchBackground = ((SolidColorBrush)value).Color.ToString();
242-
NotifyStaticPropertyChanged(nameof(FolderPartialMatchBackground));
241+
CurrentTheme.FolderNewBackground = ((SolidColorBrush)value).Color.ToString();
242+
NotifyStaticPropertyChanged(nameof(FolderNewBackground));
243243
}
244244
}
245245

@@ -267,27 +267,27 @@ public static Brush FolderDeletedBackground
267267
}
268268
}
269269

270-
public static Brush FolderNewForeground
270+
public static Brush FolderPartialMatchForeground
271271
{
272272
get;
273273
set
274274
{
275275
field = value;
276276
field.Freeze();
277-
CurrentTheme.FolderNewForeground = ((SolidColorBrush)value).Color.ToString();
278-
NotifyStaticPropertyChanged(nameof(FolderNewForeground));
277+
CurrentTheme.FolderPartialMatchForeground = ((SolidColorBrush)value).Color.ToString();
278+
NotifyStaticPropertyChanged(nameof(FolderPartialMatchForeground));
279279
}
280280
}
281281

282-
public static Brush FolderNewBackground
282+
public static Brush FolderPartialMatchBackground
283283
{
284284
get;
285285
set
286286
{
287287
field = value;
288288
field.Freeze();
289-
CurrentTheme.FolderNewBackground = ((SolidColorBrush)value).Color.ToString();
290-
NotifyStaticPropertyChanged(nameof(FolderNewBackground));
289+
CurrentTheme.FolderPartialMatchBackground = ((SolidColorBrush)value).Color.ToString();
290+
NotifyStaticPropertyChanged(nameof(FolderPartialMatchBackground));
291291
}
292292
}
293293

@@ -341,27 +341,39 @@ public static Brush FullMatchBackground
341341
}
342342
}
343343

344-
public static Brush PartialMatchForeground
344+
public static Brush NewForeground
345345
{
346346
get;
347347
set
348348
{
349349
field = value;
350350
field.Freeze();
351-
CurrentTheme.PartialMatchForeground = ((SolidColorBrush)value).Color.ToString();
352-
NotifyStaticPropertyChanged(nameof(PartialMatchForeground));
351+
CurrentTheme.NewForeground = ((SolidColorBrush)value).Color.ToString();
352+
NotifyStaticPropertyChanged(nameof(NewForeground));
353353
}
354354
}
355355

356-
public static Brush PartialMatchBackground
356+
public static Brush NewBackground
357357
{
358358
get;
359359
set
360360
{
361361
field = value;
362362
field.Freeze();
363-
CurrentTheme.PartialMatchBackground = ((SolidColorBrush)value).Color.ToString();
364-
NotifyStaticPropertyChanged(nameof(PartialMatchBackground));
363+
CurrentTheme.NewBackground = ((SolidColorBrush)value).Color.ToString();
364+
NotifyStaticPropertyChanged(nameof(NewBackground));
365+
}
366+
}
367+
368+
public static Brush MovedToBackground
369+
{
370+
get;
371+
set
372+
{
373+
field = value;
374+
field.Freeze();
375+
CurrentTheme.MovedToBackground = ((SolidColorBrush)value).Color.ToString();
376+
NotifyStaticPropertyChanged(nameof(MovedToBackground));
365377
}
366378
}
367379

@@ -389,92 +401,92 @@ public static Brush DeletedBackground
389401
}
390402
}
391403

392-
public static Brush NewForeground
404+
public static Brush MovedFromBackground
393405
{
394406
get;
395407
set
396408
{
397409
field = value;
398410
field.Freeze();
399-
CurrentTheme.NewForeground = ((SolidColorBrush)value).Color.ToString();
400-
NotifyStaticPropertyChanged(nameof(NewForeground));
411+
CurrentTheme.MovedFromBackground = ((SolidColorBrush)value).Color.ToString();
412+
NotifyStaticPropertyChanged(nameof(MovedFromBackground));
401413
}
402414
}
403415

404-
public static Brush NewBackground
416+
public static Brush PartialMatchForeground
405417
{
406418
get;
407419
set
408420
{
409421
field = value;
410422
field.Freeze();
411-
CurrentTheme.NewBackground = ((SolidColorBrush)value).Color.ToString();
412-
NotifyStaticPropertyChanged(nameof(NewBackground));
423+
CurrentTheme.PartialMatchForeground = ((SolidColorBrush)value).Color.ToString();
424+
NotifyStaticPropertyChanged(nameof(PartialMatchForeground));
413425
}
414426
}
415427

416-
public static Brush IgnoredForeground
428+
public static Brush PartialMatchBackground
417429
{
418430
get;
419431
set
420432
{
421433
field = value;
422434
field.Freeze();
423-
CurrentTheme.IgnoredForeground = ((SolidColorBrush)value).Color.ToString();
424-
NotifyStaticPropertyChanged(nameof(IgnoredForeground));
435+
CurrentTheme.PartialMatchBackground = ((SolidColorBrush)value).Color.ToString();
436+
NotifyStaticPropertyChanged(nameof(PartialMatchBackground));
425437
}
426438
}
427439

428-
public static Brush IgnoredBackground
440+
public static Brush IgnoredForeground
429441
{
430442
get;
431443
set
432444
{
433445
field = value;
434446
field.Freeze();
435-
CurrentTheme.IgnoredBackground = ((SolidColorBrush)value).Color.ToString();
436-
NotifyStaticPropertyChanged(nameof(IgnoredBackground));
447+
CurrentTheme.IgnoredForeground = ((SolidColorBrush)value).Color.ToString();
448+
NotifyStaticPropertyChanged(nameof(IgnoredForeground));
437449
}
438450
}
439451

440-
public static Brush MovedFromBackground
452+
public static Brush IgnoredBackground
441453
{
442454
get;
443455
set
444456
{
445457
field = value;
446458
field.Freeze();
447-
CurrentTheme.MovedFromBackground = ((SolidColorBrush)value).Color.ToString();
448-
NotifyStaticPropertyChanged(nameof(MovedFromBackground));
459+
CurrentTheme.IgnoredBackground = ((SolidColorBrush)value).Color.ToString();
460+
NotifyStaticPropertyChanged(nameof(IgnoredBackground));
449461
}
450462
}
451463

452-
public static Brush MovedToBackground
464+
465+
// Editor colors
466+
public static Brush WhiteSpaceForeground
453467
{
454468
get;
455469
set
456470
{
457471
field = value;
458472
field.Freeze();
459-
CurrentTheme.MovedToBackground = ((SolidColorBrush)value).Color.ToString();
460-
NotifyStaticPropertyChanged(nameof(MovedToBackground));
473+
CurrentTheme.WhiteSpaceForeground = ((SolidColorBrush)value).Color.ToString();
474+
NotifyStaticPropertyChanged(nameof(WhiteSpaceForeground));
461475
}
462476
}
463477

464-
public static Brush WhiteSpaceForeground
478+
public static Brush SelectionBackground
465479
{
466480
get;
467481
set
468482
{
469483
field = value;
470484
field.Freeze();
471-
CurrentTheme.WhiteSpaceForeground = ((SolidColorBrush)value).Color.ToString();
472-
NotifyStaticPropertyChanged(nameof(WhiteSpaceForeground));
485+
CurrentTheme.SelectionBackground = ((SolidColorBrush)value).Color.ToString();
486+
NotifyStaticPropertyChanged(nameof(SelectionBackground));
473487
}
474488
}
475489

476-
477-
// Editor colors
478490
public static Brush LineNumberColor
479491
{
480492
get;
@@ -511,18 +523,6 @@ public static Brush SnakeColor
511523
}
512524
}
513525

514-
public static Brush SelectionBackground
515-
{
516-
get;
517-
set
518-
{
519-
field = value;
520-
field.Freeze();
521-
CurrentTheme.SelectionBackground = ((SolidColorBrush)value).Color.ToString();
522-
NotifyStaticPropertyChanged(nameof(SelectionBackground));
523-
}
524-
}
525-
526526

527527
// UI colors
528528
public static Brush WindowForeground

FileDiff/ColorTheme.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ public class ColorTheme
1111
public required string FolderFullMatchForeground { get; set; }
1212
public required string FolderFullMatchBackground { get; set; }
1313

14-
public required string FolderPartialMatchForeground { get; set; }
15-
public required string FolderPartialMatchBackground { get; set; }
14+
public required string FolderNewForeground { get; set; }
15+
public required string FolderNewBackground { get; set; }
1616

1717
public required string FolderDeletedForeground { get; set; }
1818
public required string FolderDeletedBackground { get; set; }
1919

20-
public required string FolderNewForeground { get; set; }
21-
public required string FolderNewBackground { get; set; }
20+
public required string FolderPartialMatchForeground { get; set; }
21+
public required string FolderPartialMatchBackground { get; set; }
2222

2323
public required string FolderIgnoredForeground { get; set; }
2424
public required string FolderIgnoredBackground { get; set; }
@@ -27,28 +27,28 @@ public class ColorTheme
2727
public required string FullMatchForeground { get; set; }
2828
public required string FullMatchBackground { get; set; }
2929

30-
public required string PartialMatchForeground { get; set; }
31-
public required string PartialMatchBackground { get; set; }
30+
public required string NewForeground { get; set; }
31+
public required string NewBackground { get; set; }
32+
33+
public required string MovedToBackground { get; set; }
3234

3335
public required string DeletedForeground { get; set; }
3436
public required string DeletedBackground { get; set; }
3537

36-
public required string NewForeground { get; set; }
37-
public required string NewBackground { get; set; }
38+
public required string MovedFromBackground { get; set; }
39+
40+
public required string PartialMatchForeground { get; set; }
41+
public required string PartialMatchBackground { get; set; }
3842

3943
public required string IgnoredForeground { get; set; }
4044
public required string IgnoredBackground { get; set; }
4145

42-
public required string MovedFromBackground { get; set; }
43-
public required string MovedToBackground { get; set; }
44-
45-
public required string WhiteSpaceForeground { get; set; }
46-
4746
// Editor colors
47+
public required string WhiteSpaceForeground { get; set; }
48+
public required string SelectionBackground { get; set; }
4849
public required string LineNumberColor { get; set; }
4950
public required string CurrentDiffColor { get; set; }
5051
public required string SnakeColor { get; set; }
51-
public required string SelectionBackground { get; set; }
5252

5353
// UI colors
5454
public required string NormalText { get; set; }

0 commit comments

Comments
 (0)