Skip to content

Commit 31a1a2d

Browse files
authored
Fixes resizing behavior of the filters in the PMUI top panel (#6939)
1 parent d24e26d commit 31a1a2d

1 file changed

Lines changed: 44 additions & 30 deletions

File tree

src/NuGet.Clients/NuGet.PackageManagement.UI/Xamls/PackageManagerTopPanel.xaml

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@
189189
<Grid.ColumnDefinitions>
190190
<ColumnDefinition MaxWidth="320" MinWidth="118"/>
191191
<ColumnDefinition Width="auto" />
192-
<ColumnDefinition MaxWidth="125" />
193-
<ColumnDefinition MaxWidth="150"/>
192+
<ColumnDefinition Width="*" />
194193
</Grid.ColumnDefinitions>
195194
<!-- container of the search control -->
196195
<Border
@@ -218,39 +217,54 @@
218217
Width="16" />
219218
</Button>
220219

221-
<!-- prerelease checkbox -->
222-
<CheckBox
220+
<!-- grid for filters -->
221+
<Grid
223222
Grid.Column="2"
224-
x:Name="_checkboxPrerelease"
225-
AutomationProperties.AutomationId="CheckBox_Prerelease"
226-
Margin="3,0"
227223
VerticalAlignment="Center"
228-
Foreground="{DynamicResource {x:Static nuget:Brushes.UIText}}"
229-
VerticalContentAlignment="Center"
230-
Checked="_checkboxPrerelease_Checked"
231-
Unchecked="_checkboxPrerelease_Unchecked"
232-
IsChecked="True">
233-
<TextBlock TextTrimming="CharacterEllipsis" Text="{x:Static nuget:Resources.Checkbox_IncludePrerelease}" />
234-
</CheckBox>
224+
HorizontalAlignment="Left">
235225

236-
<!-- show vulnerabilities checkbox -->
237-
<CheckBox
238-
Grid.Column="3"
239-
x:Name="_checkboxVulnerabilities"
240-
AutomationProperties.AutomationId="CheckBox_Vulnerabilities"
241-
Margin="3,0"
242-
VerticalAlignment="Center"
243-
Foreground="{DynamicResource {x:Static nuget:Brushes.UIText}}"
244-
VerticalContentAlignment="Center"
245-
Checked="_checkboxVulnerabilities_Checked"
246-
Unchecked="_checkboxVulnerabilities_Unchecked"
247-
Visibility="Hidden"
248-
IsChecked="False">
249-
<TextBlock TextTrimming="CharacterEllipsis" Text="{x:Static nuget:Resources.Checkbox_Show_Vulnerable_Only}" />
250-
</CheckBox>
226+
<Grid.ColumnDefinitions>
227+
<ColumnDefinition Width="*" />
228+
<ColumnDefinition Width="*" />
229+
</Grid.ColumnDefinitions>
230+
231+
<!-- prerelease checkbox -->
232+
<CheckBox
233+
Grid.Column="0"
234+
x:Name="_checkboxPrerelease"
235+
AutomationProperties.AutomationId="CheckBox_Prerelease"
236+
Margin="3,0"
237+
VerticalAlignment="Center"
238+
Foreground="{DynamicResource {x:Static nuget:Brushes.UIText}}"
239+
VerticalContentAlignment="Center"
240+
Checked="_checkboxPrerelease_Checked"
241+
Unchecked="_checkboxPrerelease_Unchecked"
242+
IsChecked="True"
243+
ToolTip="{x:Static nuget:Resources.Checkbox_IncludePrerelease}">
244+
<TextBlock TextTrimming="CharacterEllipsis" Text="{x:Static nuget:Resources.Checkbox_IncludePrerelease}" />
245+
</CheckBox>
246+
247+
<!-- show vulnerabilities checkbox -->
248+
<CheckBox
249+
Grid.Column="1"
250+
x:Name="_checkboxVulnerabilities"
251+
AutomationProperties.AutomationId="CheckBox_Vulnerabilities"
252+
Margin="3,0"
253+
VerticalAlignment="Center"
254+
Foreground="{DynamicResource {x:Static nuget:Brushes.UIText}}"
255+
VerticalContentAlignment="Center"
256+
Checked="_checkboxVulnerabilities_Checked"
257+
Unchecked="_checkboxVulnerabilities_Unchecked"
258+
Visibility="Hidden"
259+
IsChecked="False"
260+
ToolTip="{x:Static nuget:Resources.Checkbox_Show_Vulnerable_Only}">
261+
<TextBlock TextTrimming="CharacterEllipsis" Text="{x:Static nuget:Resources.Checkbox_Show_Vulnerable_Only}" />
262+
</CheckBox>
263+
</Grid>
251264
</Grid>
265+
252266
<Grid
253-
Grid.Column="2"
267+
Grid.Column="1"
254268
VerticalAlignment="Center"
255269
HorizontalAlignment="Right">
256270

0 commit comments

Comments
 (0)