Skip to content

Commit 7f5818b

Browse files
committed
Use styles for height and width of Icons and add funnel icon.
1 parent fa49d37 commit 7f5818b

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

Rubberduck.Core/UI/Inspections/InspectionResultsControl.xaml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
<codeInspections:InspectionImageSourceConverter x:Key="InspectionIconConverter" />
2424
<codeInspections:InspectionTypeConverter x:Key="InspectionTypeConverter" />
2525

26-
<Style x:Key="IconStyle" TargetType="Image">
27-
<Setter Property="Height" Value="16" />
28-
<Setter Property="Width" Value="16" />
26+
<Style x:Key="IconMargin" TargetType="Image">
2927
<Setter Property="Margin" Value="4" />
3028
</Style>
3129

@@ -50,11 +48,17 @@
5048

5149
<BitmapImage x:Key="GroupByImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Custom/PNG/GroupBy.png" />
5250

53-
<BitmapImage x:Key="FilterByImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Custom/PNG/DisplayName.png" />
51+
<BitmapImage x:Key="FilterByImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/Funnel.png" />
5452
<BitmapImage x:Key="FilterByHintImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/information-white.png" />
5553
<BitmapImage x:Key="FilterBySuggestionImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/information.png" />
5654
<BitmapImage x:Key="FilterByWarningImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/exclamation.png" />
5755
<BitmapImage x:Key="FilterByErrorImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/cross-circle.png" />
56+
57+
<Style TargetType="Image">
58+
<Setter Property="Height" Value="16"/>
59+
<Setter Property="Width" Value="16" />
60+
</Style>
61+
5862
</ResourceDictionary>
5963
</UserControl.Resources>
6064

@@ -70,7 +74,7 @@
7074
<ToolBar Style="{StaticResource ToolBarWithOverflowOnlyShowingWhenNeededStyle}">
7175

7276
<Button Command="{Binding RefreshCommand}">
73-
<Image Height="16" Source="{StaticResource RefreshImage}" />
77+
<Image Source="{StaticResource RefreshImage}" />
7478
</Button>
7579

7680
<Separator />
@@ -79,7 +83,7 @@
7983
Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Fix}"
8084
ItemsSource="{Binding QuickFixes}">
8185
<MenuItem.Icon>
82-
<Image Height="16" Source="{StaticResource FixImage}" />
86+
<Image Source="{StaticResource FixImage}" />
8387
</MenuItem.Icon>
8488
<MenuItem.ItemContainerStyle>
8589
<Style TargetType="{x:Type MenuItem}">
@@ -94,7 +98,7 @@
9498
<Menu>
9599
<MenuItem Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GroupingGrid_GroupingStyle}" VerticalAlignment="Center">
96100
<MenuItem.Icon>
97-
<Image Height="16" Source="{StaticResource GroupByImage}" />
101+
<Image Source="{StaticResource GroupByImage}" />
98102
</MenuItem.Icon>
99103

100104
<MenuItem x:Name="GroupByInspectionType"
@@ -175,13 +179,13 @@
175179
<Separator />
176180

177181
<Button Command="{Binding CopyResultsCommand}">
178-
<Image Height="16" Source="{StaticResource CopyResultsImage}" />
182+
<Image Source="{StaticResource CopyResultsImage}" />
179183
<Button.ToolTip>
180184
<TextBlock Text="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_CopyToolTip}" />
181185
</Button.ToolTip>
182186
</Button>
183187
<Button ToolTip="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Settings}" Command="{Binding OpenInspectionSettings}" BorderThickness="0" Background="Transparent">
184-
<Image Height="16" Source="{StaticResource SettingsImage}" />
188+
<Image Source="{StaticResource SettingsImage}" />
185189
</Button>
186190
</ToolBar>
187191
</ToolBarTray>
@@ -197,7 +201,7 @@
197201
<DataGridTemplateColumn Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=CodeInspectionResults_Type}" SortDirection="{Binding}">
198202
<DataGridTemplateColumn.CellTemplate>
199203
<DataTemplate DataType="abstract1:IInspectionResult">
200-
<Image Source="{Binding Inspection, Converter={StaticResource InspectionIconConverter}}" Height="16" />
204+
<Image Source="{Binding Inspection, Converter={StaticResource InspectionIconConverter}}" />
201205
</DataTemplate>
202206
</DataGridTemplateColumn.CellTemplate>
203207
</DataGridTemplateColumn>
@@ -216,7 +220,7 @@
216220
<DataGridTemplateColumn Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=CodeInspectionResults_Type}">
217221
<DataGridTemplateColumn.CellTemplate>
218222
<DataTemplate DataType="abstract1:IInspectionResult">
219-
<Image Source="{Binding Inspection, Converter={StaticResource InspectionIconConverter}}" Height="16" />
223+
<Image Source="{Binding Inspection, Converter={StaticResource InspectionIconConverter}}" />
220224
</DataTemplate>
221225
</DataGridTemplateColumn.CellTemplate>
222226
</DataGridTemplateColumn>
@@ -240,7 +244,7 @@
240244
<ColumnDefinition Width="25" />
241245
<ColumnDefinition />
242246
</Grid.ColumnDefinitions>
243-
<Image Style="{StaticResource IconStyle}" VerticalAlignment="Top" Grid.Column="0"
247+
<Image Style="{StaticResource IconMargin}" VerticalAlignment="Top" Grid.Column="0"
244248
Source="{Binding SelectedItem.Inspection.Severity, Converter={StaticResource SeverityIconConverter}}"/>
245249
<TextBlock Grid.Column="1" Margin="4" Text="{Binding SelectedItem.Inspection.Description}" FontWeight="Bold" TextWrapping="WrapWithOverflow"/>
246250
</Grid>
598 Bytes
Loading

Rubberduck.Resources/Rubberduck.Resources.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,7 @@
684684
<Resource Include="Icons\Fugue\ui-tab-content.png" />
685685
<Content Include="Icons\Custom\PNG\MdiForm.png" />
686686
<Resource Include="Icons\Fugue\document-import.png" />
687+
<Content Include="Icons\Fugue\funnel.png" />
687688
<Content Include="Splash.png" />
688689
<Resource Include="Icons\Fugue\lock--exclamation.png" />
689690
<Resource Include="Rubberduck.png" />

0 commit comments

Comments
 (0)