Fix search bar overflowing behind icon buttons at narrow window sizes (#4831)

* fix(search): make search bar stretch instead of overflowing at narrow window sizes

* fix(ui): sync runtime MinWidth override with XAML value

Add_Loaded was hardcoding $sync.Form.MinWidth back to 1000 after
load, overriding the 1150 set in inputXML.xaml and letting the
window shrink below the space the search bar/toolbar layout needs.

* fix(ui): address responsive search review feedback

* fix(ui): enforce usable toolbar width

---------

Co-authored-by: Chris Titus <contact@christitus.com>
This commit is contained in:
Yayo Razo
2026-07-15 20:41:41 -05:00
committed by GitHub
co-authored by Chris Titus
parent 11783c75a8
commit 975616b58f
3 changed files with 36 additions and 6 deletions
+5 -5
View File
@@ -1039,13 +1039,12 @@
<ColumnDefinition Width="Auto"/><!-- Buttons area -->
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Margin="5,0,0,0" Width="{DynamicResource SearchBarWidth}" Height="{DynamicResource SearchBarHeight}" VerticalAlignment="Center" HorizontalAlignment="Left">
<Border Grid.Column="0" Margin="5,0,10,0" MinWidth="120" Height="{DynamicResource SearchBarHeight}" VerticalAlignment="Center" HorizontalAlignment="Stretch">
<Grid>
<TextBox
Width="{DynamicResource SearchBarWidth}"
Height="{DynamicResource SearchBarHeight}"
FontSize="{DynamicResource SearchBarTextBoxFontSize}"
VerticalAlignment="Center" HorizontalAlignment="Left"
VerticalAlignment="Center" HorizontalAlignment="Stretch"
BorderThickness="1"
Name="SearchBar"
Foreground="{DynamicResource MainForegroundColor}" Background="{DynamicResource MainBackgroundColor}"
@@ -1053,6 +1052,7 @@
ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter">
</TextBox>
<TextBlock
Name="SearchBarIcon"
VerticalAlignment="Center" HorizontalAlignment="Right"
FontFamily="Segoe MDL2 Assets"
Foreground="{DynamicResource ButtonBackgroundSelectedColor}"
@@ -1062,10 +1062,10 @@
</Grid>
</Border>
<Button Grid.Column="0"
VerticalAlignment="Center" HorizontalAlignment="Left"
VerticalAlignment="Center" HorizontalAlignment="Right"
Name="SearchBarClearButton"
Style="{StaticResource SearchBarClearButtonStyle}"
Margin="213,0,0,0" Visibility="Collapsed">
Margin="0,0,20,0" Visibility="Collapsed">
</Button>
<!-- Buttons Container -->