Skip to content

Commit 2a891c8

Browse files
committed
Clean up the remaining miscellaneous use of colors, provide color brush reference for gray, white and black to make it easy to reference colors.
1 parent b52997d commit 2a891c8

File tree

11 files changed

+37
-20
lines changed

11 files changed

+37
-20
lines changed

Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</Border>
5050
<ControlTemplate.Triggers>
5151
<Trigger Property="IsSelected" Value="True">
52-
<Setter TargetName="PART_Border" Property="BorderBrush" Value="Blue" />
52+
<Setter TargetName="PART_Border" Property="BorderBrush" Value="{StaticResource TabSelectionUnderlineBrush}" />
5353
</Trigger>
5454
</ControlTemplate.Triggers>
5555
</ControlTemplate>

Rubberduck.Core/UI/Controls/EmptyUIRefresh.xaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@
66
mc:Ignorable="d"
77
d:DesignHeight="300" d:DesignWidth="300">
88
<UserControl.Resources>
9-
<BitmapImage x:Key="DoubleArrowImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/arrow-circle-double.png" />
9+
<ResourceDictionary>
10+
<ResourceDictionary.MergedDictionaries>
11+
<ResourceDictionary Source="../Styles/DefaultStyle.xaml"/>
12+
</ResourceDictionary.MergedDictionaries>
13+
<BitmapImage x:Key="DoubleArrowImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/arrow-circle-double.png" />
14+
</ResourceDictionary>
1015
</UserControl.Resources>
1116

12-
<Border Background="AliceBlue" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext}">
17+
<Border Background="{StaticResource BackgroundSoftBrush}" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext}">
1318
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="WrapWithOverflow" TextAlignment="Center"
1419
MinWidth="200">
1520
<Run FontWeight="Bold" Text="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=EmptyUIRefreshMessage_Title}"/><LineBreak/>

Rubberduck.Core/UI/Controls/GroupingGrid.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<Setter Property="Template">
3030
<Setter.Value>
3131
<ControlTemplate>
32-
<Expander Background="{StaticResource BackgroundLightBrush}" Foreground="Black" FontWeight="SemiBold"
32+
<Expander Background="{StaticResource BackgroundLightBrush}" Foreground="{StaticResource CaptionDarkBrush}" FontWeight="SemiBold"
3333
IsExpanded="{Binding InitialExpandedState, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:GroupingGrid}}}">
3434
<Expander.Header>
3535
<StackPanel Orientation="Horizontal">

Rubberduck.Core/UI/Controls/ToolBar.xaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@
266266
<ControlTemplate TargetType="{x:Type ToggleButton}">
267267
<Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,0,3,3" Background="{TemplateBinding Background}">
268268
<Canvas Width="7" VerticalAlignment="Bottom" SnapsToDevicePixels="true" Margin="2,7,2,2" Height="6" HorizontalAlignment="Right">
269-
<Path Data="M 1.5 1 L 1.5 6" Stroke="White"/>
269+
<Path Data="M 1.5 1 L 1.5 6" Stroke="{StaticResource WhiteBrush}"/>
270270
<Path Data="M 0.5 0 L 0.5 5" Stroke="{TemplateBinding Foreground}"/>
271-
<Path Data="M 3.5 0.5 L 7 3.5 L 4 6.5 Z" Fill="White"/>
271+
<Path Data="M 3.5 0.5 L 7 3.5 L 4 6.5 Z" Fill="{StaticResource WhiteBrush}"/>
272272
<Path Data="M 3 -0.5 L 6 2.5 L 3 5.5 Z" Fill="{TemplateBinding Foreground}"/>
273273
</Canvas>
274274
</Border>
@@ -301,9 +301,9 @@
301301
<ControlTemplate TargetType="{x:Type ToggleButton}">
302302
<Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,3,3,0" Background="{TemplateBinding Background}">
303303
<Canvas Width="6" VerticalAlignment="Bottom" SnapsToDevicePixels="true" Margin="7,2,2,2" Height="7" HorizontalAlignment="Right">
304-
<Path Data="M 1 1.5 L 6 1.5" Stroke="White"/>
304+
<Path Data="M 1 1.5 L 6 1.5" Stroke="{StaticResource WhiteBrush}"/>
305305
<Path Data="M 0 0.5 L 5 0.5" Stroke="{TemplateBinding Foreground}"/>
306-
<Path Data="M 0.5 4 L 6.5 4 L 3.5 7 Z" Fill="White"/>
306+
<Path Data="M 0.5 4 L 6.5 4 L 3.5 7 Z" Fill="{StaticResource WhiteBrush}"/>
307307
<Path Data="M -0.5 3 L 5.5 3 L 2.5 6 Z" Fill="{TemplateBinding Foreground}"/>
308308
</Canvas>
309309
</Border>
@@ -337,7 +337,7 @@
337337
<DrawingBrush ViewboxUnits="Absolute" ViewportUnits="Absolute" Viewport="0,0,4,4" Viewbox="0,0,4,4" TileMode="Tile">
338338
<DrawingBrush.Drawing>
339339
<DrawingGroup>
340-
<GeometryDrawing Brush="White" Geometry="M 1 1 L 1 3 L 3 3 L 3 1 z"/>
340+
<GeometryDrawing Brush="{StaticResource WhiteBrush}" Geometry="M 1 1 L 1 3 L 3 3 L 3 1 z"/>
341341
<GeometryDrawing Brush="{StaticResource ToolBarGripper}" Geometry="M 0 0 L 0 2 L 2 2 L 2 0 z"/>
342342
</DrawingGroup>
343343
</DrawingBrush.Drawing>

Rubberduck.Core/UI/Inspections/InspectionResultsControl.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256

257257
<GridSplitter Grid.Row="2" Height="5" ShowsPreview="True" Cursor="SizeNS" HorizontalAlignment="Stretch"/>
258258

259-
<Border Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="DimGray">
259+
<Border Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="{StaticResource GrayBrush}">
260260
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
261261
<StackPanel Orientation="Vertical" MinHeight="48" Background="{StaticResource BackgroundLightBrush}">
262262
<Grid Margin="4" HorizontalAlignment="Stretch">

Rubberduck.Core/UI/Refactorings/RemoveParameters/RemoveParametersView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<Setter Property="HorizontalContentAlignment" Value="Left"/>
4242
<Setter Property="VerticalContentAlignment" Value="Center"/>
4343
<Setter Property="Background" Value="Transparent"/>
44-
<Setter Property="BorderBrush" Value="Black"/>
44+
<Setter Property="BorderBrush" Value="{StaticResource BlackBrush}"/>
4545
<Setter Property="BorderThickness" Value="0,.5,0,0"/>
4646
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
4747
<Setter Property="Height" Value="26" />

Rubberduck.Core/UI/Refactorings/ReorderParameters/ReorderParametersView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<Setter Property="HorizontalContentAlignment" Value="Left"/>
4141
<Setter Property="VerticalContentAlignment" Value="Center"/>
4242
<Setter Property="Background" Value="Transparent"/>
43-
<Setter Property="BorderBrush" Value="Black"/>
43+
<Setter Property="BorderBrush" Value="{StaticResource BlackBrush}"/>
4444
<Setter Property="BorderThickness" Value="0,.5,0,0"/>
4545
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
4646
<Setter Property="Height" Value="26" />

Rubberduck.Core/UI/Settings/GeneralSettings.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
<Label DockPanel.Dock="Left" Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GeneralSettings_HotkeysLabel}" FontWeight="SemiBold" />
115115
<Label DockPanel.Dock="Right" Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GeneralSettings_HotkeyRestrictionLabel}"
116116
Visibility="{Binding ShouldDisplayHotkeyModificationLabel, Converter={StaticResource BoolToVisibility}}"
117-
Foreground="Red"
117+
Foreground="{StaticResource CaptionErrorBrush}"
118118
FontWeight="Bold"/>
119119
</DockPanel>
120120

Rubberduck.Core/UI/Settings/SettingsControl.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<Border Grid.ColumnSpan="2"
9999
Height="50"
100100
VerticalAlignment="Top"
101-
BorderBrush="Black"
101+
BorderBrush="{StaticResource BlackBrush}"
102102
BorderThickness="0, 1">
103103
<StackPanel Background="{StaticResource BackgroundLightBrush}">
104104
<Label Content="{Binding ElementName=ListBox, Path=SelectedItem.Label}" FontWeight="Bold" />
@@ -123,7 +123,7 @@
123123
Grid.ColumnSpan="2"
124124
Height="40"
125125
VerticalAlignment="Bottom"
126-
BorderBrush="Black"
126+
BorderBrush="{StaticResource BlackBrush}"
127127
BorderThickness="0, 1, 0, 0">
128128
<DockPanel VerticalAlignment="Center"
129129
Height="40"

Rubberduck.Core/UI/Styles/DefaultStyle.xaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<Color x:Key="GlyphPanelColor">#FFF8F8FF</Color>
2424
<Color x:Key="GlyphPanelTemplateColor">#FF212121</Color>
2525
<Color x:Key="GlyphPanelBorderColor">#80DADADA</Color>
26-
<Color x:Key="SoftBackgroundColor">#FFF8F8FF</Color>
2726
<Color x:Key="DropShadowColor">#71000000</Color>
2827
<Color x:Key="GreenButtonColor">#FF40C954</Color>
2928
<Color x:Key="GreenButtonBorderColor">#FF008000</Color>
@@ -36,12 +35,19 @@
3635
<Color x:Key="ExpanderBorderColor">#FFA9A9A9</Color>
3736
<Color x:Key="ExpanderBackgroundColor">#FFFFFFFF</Color>
3837
<Color x:Key="CaptionLightColor">#FFFFFFFF</Color>
38+
<Color x:Key="CaptionDarkColor">#FF000000</Color>
39+
<Color x:Key="CaptionErrorColor">#FFFF0000</Color>
3940
<Color x:Key="CaptionDisabledColor">#FF808080</Color>
4041
<Color x:Key="CaptionHyperlinkColor">#FF0000FF</Color>
4142
<Color x:Key="CaptionHyperlinkVisitedColor">#FFFF0000</Color>
4243
<Color x:Key="BackgroundDarkColor">#FFA9A9A9</Color>
4344
<Color x:Key="BackgroundLightColor">#FFF5F5F5</Color>
45+
<Color x:Key="BackgroundSoftColor">#FFF8F8FF</Color>
4446
<Color x:Key="HeaderBackgroundDarkColor">#FFA9A9A9</Color>
47+
<Color x:Key="TabSelectionUnderlineColor">#FF0000FF</Color>
48+
<Color x:Key="GrayColor">#FF696969</Color>
49+
<Color x:Key="BlackColor">#FFFFFFFF</Color>
50+
<Color x:Key="WhiteColor">#FF000000</Color>
4551

4652
<SolidColorBrush x:Key="HighlightGradientStartBrush" Color="{StaticResource HighlightGradientStartColor}"/>
4753
<SolidColorBrush x:Key="HighlightGradientEndBrush" Color="{StaticResource HighlightGradientEndColor}"/>
@@ -52,7 +58,6 @@
5258
<SolidColorBrush x:Key="GlyphPanelBrush" Color="{StaticResource GlyphPanelColor}"/>
5359
<SolidColorBrush x:Key="GlyphPanelTemplateBrush" Color="{StaticResource GlyphPanelTemplateColor}"/>
5460
<SolidColorBrush x:Key="GlyphPanelBorderBrush" Color="{StaticResource GlyphPanelBorderColor}"/>
55-
<SolidColorBrush x:Key="SoftBackgroundBrush" Color="{StaticResource SoftBackgroundColor}"/>
5661
<SolidColorBrush x:Key="GreenButtonBrush" Color="{StaticResource GreenButtonColor}"/>
5762
<SolidColorBrush x:Key="GreenButtonBorderBrush" Color="{StaticResource GreenButtonBorderColor}"/>
5863
<SolidColorBrush x:Key="GreenButtonMouseOverBrush" Color="{StaticResource GreenButtonMouseOverColor}"/>
@@ -64,14 +69,21 @@
6469
<SolidColorBrush x:Key="ExpanderBackgroundBrush" Color="{StaticResource ExpanderBackgroundColor}"/>
6570
<SolidColorBrush x:Key="ExpanderBorderBrush" Color="{StaticResource ExpanderBorderColor}"/>
6671
<SolidColorBrush x:Key="CaptionLightBrush" Color="{StaticResource CaptionLightColor}"/>
72+
<SolidColorBrush x:Key="CaptionDarkBrush" Color="{StaticResource CaptionDarkColor}"/>
73+
<SolidColorBrush x:Key="CaptionErrorBrush" Color="{StaticResource CaptionErrorColor}"/>
6774
<SolidColorBrush x:Key="CaptionDisabledBrush" Color="{StaticResource CaptionDisabledColor}"/>
6875
<SolidColorBrush x:Key="CaptionHyperlinkBrush" Color="{StaticResource CaptionHyperlinkColor}"/>
6976
<SolidColorBrush x:Key="CaptionHyperlinkVisitedBrush" Color="{StaticResource CaptionHyperlinkVisitedColor}"/>
7077
<SolidColorBrush x:Key="BackgroundDarkBrush" Color="{StaticResource BackgroundDarkColor}"/>
7178
<SolidColorBrush x:Key="BackgroundLightBrush" Color="{StaticResource BackgroundLightColor}"/>
7279
<SolidColorBrush x:Key="BackgroundWhiteBrush" Color="{StaticResource BackgroundWhiteColor}"/>
80+
<SolidColorBrush x:Key="BackgroundSoftBrush" Color="{StaticResource BackgroundSoftColor}"/>
7381
<SolidColorBrush x:Key="HeaderBackgroundDarkBrush" Color="{StaticResource HeaderBackgroundDarkColor}"/>
74-
82+
<SolidColorBrush x:Key="TabSelectionUnderlineBrush" Color="{StaticResource TabSelectionUnderlineColor}"/>
83+
<SolidColorBrush x:Key="GrayBrush" Color="{StaticResource GrayColor}"/>
84+
<SolidColorBrush x:Key="BlackBrush" Color="{StaticResource BlackColor}"/>
85+
<SolidColorBrush x:Key="WhiteBrush" Color="{StaticResource WhiteColor}"/>
86+
7587
<SolidColorBrush x:Key="Item.MouseOver.Background" Color="#1F26A0DA"/>
7688
<SolidColorBrush x:Key="Item.MouseOver.Border" Color="#A826A0DA"/>
7789
<SolidColorBrush x:Key="Item.SelectedActive.Border" Color="#ADC6E5"/>
@@ -112,7 +124,7 @@
112124
</Style>
113125
</Style.Resources>
114126
<Setter Property="BorderThickness" Value="0,.5,0,0" />
115-
<Setter Property="BorderBrush" Value="DarkGray" />
127+
<Setter Property="BorderBrush" Value="{StaticResource ExpanderBorderBrush}" />
116128
<Setter Property="Height" Value="26" />
117129
<Setter Property="TextBlock.FontWeight" Value="Normal" />
118130
<Style.Triggers>

0 commit comments

Comments
 (0)