Skip to content

Commit 1e28df7

Browse files
committed
Fix loading-bar margin when no-item situation
1 parent 54ea68c commit 1e28df7

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

Flow.Launcher/MainWindow.xaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@
180180
Modifiers="{Binding OpenResultCommandModifiers}" />
181181
</Window.InputBindings>
182182
<Grid>
183-
<Border MouseDown="OnMouseDown" Style="{DynamicResource WindowBorderStyle}">
183+
<Border
184+
ClipToBounds="True"
185+
MouseDown="OnMouseDown"
186+
Style="{DynamicResource WindowBorderStyle}">
184187
<StackPanel Orientation="Vertical">
185188
<Grid>
186189
<Border Style="{DynamicResource QueryBoxBgStyle}">

Flow.Launcher/ResultListBox.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
88
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
99
MaxHeight="{Binding MaxHeight}"
10-
Margin="{DynamicResource ResultMargin}"
1110
HorizontalContentAlignment="Stretch"
1211
d:DataContext="{d:DesignInstance vm:ResultsViewModel}"
1312
d:DesignHeight="100"

Flow.Launcher/Themes/Base.xaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,9 @@
248248
<Setter Property="Background" Value="Transparent" />
249249
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
250250
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
251-
<Setter Property="Margin" Value="0,0,0,0" />
251+
<Setter Property="Margin" Value="{DynamicResource ResultMargin}" />
252252
<Setter Property="Padding" Value="0,0,0,0" />
253+
253254
<Setter Property="Template">
254255
<Setter.Value>
255256
<ControlTemplate TargetType="ListBox">
@@ -273,6 +274,11 @@
273274
</ControlTemplate>
274275
</Setter.Value>
275276
</Setter>
277+
<Style.Triggers>
278+
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Items.Count}" Value="0">
279+
<Setter Property="Margin" Value="0" />
280+
</DataTrigger>
281+
</Style.Triggers>
276282
</Style>
277283

278284
<!-- ScrollViewer Style -->
@@ -360,7 +366,6 @@
360366
<Style.Triggers>
361367
<MultiDataTrigger>
362368
<MultiDataTrigger.Conditions>
363-
<Condition Binding="{Binding ElementName=QueryTextBox, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0" />
364369
<Condition Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Collapsed" />
365370
<Condition Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Collapsed" />
366371
<Condition Binding="{Binding ElementName=History, Path=Visibility}" Value="Collapsed" />

0 commit comments

Comments
 (0)