Skip to content

Commit 7c64c9a

Browse files
committed
Code cleanup
1 parent f0889c7 commit 7c64c9a

4 files changed

Lines changed: 12 additions & 43 deletions

File tree

FileDiff/AppSettings.cs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -437,30 +437,6 @@ public static Brush PartialMatchBackground
437437
}
438438
}
439439

440-
public static Brush IgnoredForeground
441-
{
442-
get;
443-
set
444-
{
445-
field = value;
446-
field.Freeze();
447-
CurrentTheme.IgnoredForeground = ((SolidColorBrush)value).Color.ToString();
448-
NotifyStaticPropertyChanged(nameof(IgnoredForeground));
449-
}
450-
}
451-
452-
public static Brush IgnoredBackground
453-
{
454-
get;
455-
set
456-
{
457-
field = value;
458-
field.Freeze();
459-
CurrentTheme.IgnoredBackground = ((SolidColorBrush)value).Color.ToString();
460-
NotifyStaticPropertyChanged(nameof(IgnoredBackground));
461-
}
462-
}
463-
464440

465441
// Editor colors
466442
public static Brush WhiteSpaceForeground
@@ -892,9 +868,6 @@ private static void UpdateCachedSettings()
892868
NewForeground = new SolidColorBrush((Color)ColorConverter.ConvertFromString(CurrentTheme.NewForeground));
893869
NewBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString(CurrentTheme.NewBackground));
894870

895-
IgnoredForeground = new SolidColorBrush((Color)ColorConverter.ConvertFromString(CurrentTheme.IgnoredForeground));
896-
IgnoredBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString(CurrentTheme.IgnoredBackground));
897-
898871
MovedFromBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString(CurrentTheme.MovedFromBackground));
899872
MovedToBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString(CurrentTheme.MovedToBackground));
900873

@@ -942,8 +915,6 @@ internal static Brush GetFileForeground(TextState state)
942915
return NewForeground;
943916
case TextState.PartialMatch:
944917
return PartialMatchForeground;
945-
case TextState.Ignored:
946-
return IgnoredForeground;
947918

948919
default:
949920
return FullMatchForeground;
@@ -964,8 +935,6 @@ internal static Brush GetFileBackground(TextState state)
964935
return MovedToBackground;
965936
case TextState.PartialMatch:
966937
return PartialMatchBackground;
967-
case TextState.Ignored:
968-
return IgnoredBackground;
969938

970939
default:
971940
return FullMatchBackground;

FileDiff/ColorTheme.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ public class ColorTheme
4040
public required string PartialMatchForeground { get; set; }
4141
public required string PartialMatchBackground { get; set; }
4242

43-
public required string IgnoredForeground { get; set; }
44-
public required string IgnoredBackground { get; set; }
45-
4643
// Editor colors
4744
public required string WhiteSpaceForeground { get; set; }
4845
public required string SelectionBackground { get; set; }

FileDiff/DefaultSettings.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ public static class DefaultSettings
4242
PartialMatchForeground = "#FF9698FF",
4343
PartialMatchBackground = "#FF2B293A",
4444

45-
IgnoredForeground = "#FF7E7E7E",
46-
IgnoredBackground = "#FF212121",
47-
4845
// Editor colors
4946
WhiteSpaceForeground = "#FF3871A7",
5047
SelectionBackground = "#320096D2",
@@ -107,9 +104,6 @@ public static class DefaultSettings
107104
PartialMatchForeground = "#FF000000",
108105
PartialMatchBackground = "#FFDCDCFF",
109106

110-
IgnoredForeground = "#FF5A5A5A",
111-
IgnoredBackground = "#FFDCDCDC",
112-
113107
// Editor colors
114108
WhiteSpaceForeground = "#FF2E8CB5",
115109
SelectionBackground = "#320096D2",

FileDiff/Windows/OptionsWindow.xaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,18 @@
194194
<Rectangle Grid.Row="12" Grid.Column="1" Margin="5" Fill="{Binding Path=(local:AppSettings.PartialMatchForeground), Mode=TwoWay}" MouseLeftButtonUp="Rectangle_MouseUp" />
195195
<Rectangle Grid.Row="12" Grid.Column="2" Margin="5" Fill="{Binding Path=(local:AppSettings.PartialMatchBackground), Mode=TwoWay}" MouseLeftButtonUp="Rectangle_MouseUp" />
196196

197-
<Label Grid.Row="13" Content="Ignored" />
198-
<Rectangle Grid.Row="13" Grid.Column="1" Margin="5" Fill="{Binding Path=(local:AppSettings.IgnoredForeground), Mode=TwoWay}" MouseLeftButtonUp="Rectangle_MouseUp" />
199-
<Rectangle Grid.Row="13" Grid.Column="2" Margin="5" Fill="{Binding Path=(local:AppSettings.IgnoredBackground), Mode=TwoWay}" MouseLeftButtonUp="Rectangle_MouseUp" />
197+
198+
<Border Grid.Row="13" Grid.ColumnSpan="3" Margin="0,5" BorderThickness="1">
199+
<Border.Background>
200+
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
201+
<GradientStop Offset="0" Color="{Binding Path=(local:AppSettings.WindowBackgroundColor), FallbackValue=#FFFFFFFF}" />
202+
<GradientStop Offset="1" Color="{Binding Path=(local:AppSettings.DialogBackgroundColor), FallbackValue=#FFF0F0F0}" />
203+
</LinearGradientBrush>
204+
</Border.Background>
205+
<TextBlock Padding="7" Text="Editor Colors" />
206+
</Border>
207+
<Label Grid.Row="13" Grid.Column="1" Content="Foreground" />
208+
<Label Grid.Row="13" Grid.Column="2" Content="Background" />
200209

201210
<Label Grid.Row="14" Content="White Space Characters" />
202211
<Rectangle x:Name="WhiteSpaceForeground" Grid.Row="14" Grid.Column="1" Margin="5" Fill="{Binding Path=(local:AppSettings.WhiteSpaceForeground), Mode=TwoWay}" MouseLeftButtonUp="Rectangle_MouseUp" />

0 commit comments

Comments
 (0)