Skip to content

Commit 02036f1

Browse files
committed
add width slider
1 parent e69b454 commit 02036f1

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,19 @@ namespace Flow.Launcher.Infrastructure.UserSettings
1010
public class Settings : BaseModel
1111
{
1212
private string language = "en";
13-
13+
private int windowsize = 580;
1414
public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}";
1515
public string OpenResultModifiers { get; set; } = KeyConstant.Alt;
1616
public bool ShowOpenResultHotkey { get; set; } = true;
17+
public int WindowSize
18+
{
19+
get => windowsize; set
20+
{
21+
windowsize = value;
22+
OnPropertyChanged();
23+
}
24+
}
25+
1726
public string Language
1827
{
1928
get => language; set

Flow.Launcher/SettingWindow.xaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,24 @@
674674

675675
<StackPanel Grid.Row="4" Margin="0 0 0 10" Orientation="Vertical">
676676

677+
<Border Style="{DynamicResource SettingGroupBox}" Margin="0 12 0 18">
678+
<ItemsControl Style="{StaticResource SettingGrid}">
679+
<StackPanel Style="{StaticResource TextPanel}">
680+
<TextBlock Text="Window Width Size" Style="{DynamicResource SettingTitleLabel}"/>
681+
</StackPanel>
682+
<!--<Button DockPanel.Dock="Top" Margin="0,0,18,0" Width="180" HorizontalAlignment="Center"
683+
Click="OpenPluginFolder" Grid.Column="2">Open Theme Folder</Button>-->
684+
<StackPanel Orientation="Horizontal" Grid.Column="2">
685+
<TextBlock Text="{Binding ElementName=WindowWidthValue, Path=Value, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" TextAlignment="Right" Width="100" Margin="0 0 8 2"/>
686+
<Slider Name="WindowWidthValue" Value="{Binding Settings.WindowSize, Mode=TwoWay}" Maximum="1000" Minimum="400" Margin="0,0,18,0" TickFrequency="10" IsSnapToTickEnabled="True" Width="400"/>
687+
</StackPanel>
688+
<TextBlock FontFamily="/Resources/#Segoe Fluent Icons" FontSize="20" Grid.Column="0" VerticalAlignment="Center" Margin="24 0 16 0">
689+
&#xe740;
690+
</TextBlock>
691+
</ItemsControl>
692+
</Border>
693+
694+
677695
<Border Style="{DynamicResource SettingGroupBox}" Padding="0" CornerRadius="5" Margin="0 30 0 0">
678696
<StackPanel Orientation="Vertical">
679697
<Border Style="{DynamicResource SettingGroupBox}" Margin="0" BorderThickness="0">
@@ -753,6 +771,7 @@
753771
</Border>
754772

755773
<StackPanel>
774+
756775
<Border Style="{DynamicResource SettingGroupBox}" Margin="0 12 0 18">
757776
<ItemsControl Style="{StaticResource SettingGrid}">
758777
<StackPanel Style="{StaticResource TextPanel}">
@@ -765,6 +784,7 @@
765784
</TextBlock>
766785
</ItemsControl>
767786
</Border>
787+
768788
</StackPanel>
769789
</StackPanel>
770790
</Grid>

0 commit comments

Comments
 (0)