Skip to content

Commit 93d7d0a

Browse files
committed
PluginSettingsWindow: Polish UI
- Update PluginSettingsWindow initial dimensions to fit new layout - Remove top border from enabled row (first row) - Simplify border Styling - Remove unnecessary containers/wrappers in xaml - Remove unnecessary properties in xaml - Move scrollbar to edge of window - Move margins from ScrollViewer to inner StackPanel - Adjust top margin of plugin header in xaml
1 parent 45b1df1 commit 93d7d0a

1 file changed

Lines changed: 27 additions & 40 deletions

File tree

Flow.Launcher/PluginSettingsWindow.xaml

Lines changed: 27 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
6-
Width="920"
7-
Height="320"
8-
MinWidth="720"
9-
MinHeight="230"
6+
Width="800"
7+
Height="Auto"
8+
MinWidth="600"
9+
MinHeight="300"
1010
ResizeMode="CanResize"
1111
SnapsToDevicePixels="True"
1212
Loaded="OnLoaded"
@@ -47,9 +47,8 @@
4747
</Style>
4848
</Window.Resources>
4949

50-
<Grid>
51-
<Border Style="{StaticResource WindowMainPanelStyle}">
52-
<Grid Background="{DynamicResource Color01B}">
50+
<Border Style="{StaticResource WindowMainPanelStyle}">
51+
<Grid Background="{DynamicResource Color01B}">
5352
<Grid.ColumnDefinitions>
5453
<ColumnDefinition Width="Auto" />
5554
<ColumnDefinition Width="*" />
@@ -171,23 +170,18 @@
171170
</Path>
172171
</Button>
173172

174-
<Border
173+
<ScrollViewer
175174
Grid.Row="1"
176175
Grid.Column="0"
177176
Grid.ColumnSpan="5"
178-
Margin="20 8 20 16">
179-
<ScrollViewer
180-
FontSize="14"
181-
HorizontalScrollBarVisibility="Disabled"
182-
VerticalScrollBarVisibility="Auto">
183-
<StackPanel Margin="8 0 32 0">
177+
FontSize="14"
178+
HorizontalScrollBarVisibility="Disabled"
179+
VerticalScrollBarVisibility="Auto">
180+
<StackPanel Margin="32 8 32 16">
184181
<!-- Plugin header -->
185-
<Border
186-
Margin="0"
187-
Padding="0 12">
188-
<Grid Margin="16 12 18 12">
182+
<Grid Margin="16 16 18 24">
189183
<Grid.ColumnDefinitions>
190-
<ColumnDefinition Width="36" MinWidth="36" />
184+
<ColumnDefinition Width="36" />
191185
<ColumnDefinition Width="*" />
192186
</Grid.ColumnDefinitions>
193187
<Image
@@ -214,23 +208,19 @@
214208
Text="{Binding PluginPair.Metadata.Description}"
215209
TextWrapping="WrapWithOverflow" />
216210
</StackPanel>
217-
</Grid>
218-
</Border>
211+
</Grid>
219212

220-
<Border
221-
Margin="0"
222-
Padding="0"
223-
CornerRadius="5 5 0 0">
224-
<Border.Style>
225-
<Style BasedOn="{StaticResource SettingGroupBox}" TargetType="Border">
226-
<Setter Property="BorderThickness" Value="0" />
227-
<Setter Property="Padding" Value="0" />
228-
<Setter Property="Margin" Value="0" />
229-
</Style>
230-
</Border.Style>
213+
<Border
214+
Margin="0"
215+
Padding="0"
216+
CornerRadius="5 5 0 0"
217+
BorderThickness="0"
218+
Style="{StaticResource SettingGroupBox}">
231219
<StackPanel>
232220
<!-- Enabled row -->
233-
<Border Style="{StaticResource PluginSettingsRowBorderStyle}">
221+
<Border
222+
BorderThickness="0"
223+
Style="{StaticResource PluginSettingsRowBorderStyle}">
234224
<DockPanel Margin="{StaticResource SettingPanelMargin}" LastChildFill="False">
235225
<TextBlock Style="{StaticResource PluginSettingsRowGlyphStyle}">
236226
&#xe7e8;
@@ -317,7 +307,6 @@
317307
Text="{DynamicResource searchDelay}" />
318308
<ui:NumberBox
319309
Width="120"
320-
MinWidth="120"
321310
Margin="0 -4.5 0 -4.5"
322311
HorizontalAlignment="Right"
323312
IsEnabled="{Binding SearchDelayEnabled}"
@@ -373,10 +362,8 @@
373362

374363
<!-- Plugin Footer -->
375364
<ContentControl Content="{Binding BottomPart2}" />
376-
</StackPanel>
377-
</ScrollViewer>
378-
</Border>
379-
</Grid>
380-
</Border>
381-
</Grid>
365+
</StackPanel>
366+
</ScrollViewer>
367+
</Grid>
368+
</Border>
382369
</Window>

0 commit comments

Comments
 (0)