add width slider

This commit is contained in:
DB p 2021-10-20 23:58:34 +09:00
parent e69b454139
commit 02036f13a4
2 changed files with 30 additions and 1 deletions

View file

@ -10,10 +10,19 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public class Settings : BaseModel
{
private string language = "en";
private int windowsize = 580;
public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}";
public string OpenResultModifiers { get; set; } = KeyConstant.Alt;
public bool ShowOpenResultHotkey { get; set; } = true;
public int WindowSize
{
get => windowsize; set
{
windowsize = value;
OnPropertyChanged();
}
}
public string Language
{
get => language; set

View file

@ -674,6 +674,24 @@
<StackPanel Grid.Row="4" Margin="0 0 0 10" Orientation="Vertical">
<Border Style="{DynamicResource SettingGroupBox}" Margin="0 12 0 18">
<ItemsControl Style="{StaticResource SettingGrid}">
<StackPanel Style="{StaticResource TextPanel}">
<TextBlock Text="Window Width Size" Style="{DynamicResource SettingTitleLabel}"/>
</StackPanel>
<!--<Button DockPanel.Dock="Top" Margin="0,0,18,0" Width="180" HorizontalAlignment="Center"
Click="OpenPluginFolder" Grid.Column="2">Open Theme Folder</Button>-->
<StackPanel Orientation="Horizontal" Grid.Column="2">
<TextBlock Text="{Binding ElementName=WindowWidthValue, Path=Value, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" TextAlignment="Right" Width="100" Margin="0 0 8 2"/>
<Slider Name="WindowWidthValue" Value="{Binding Settings.WindowSize, Mode=TwoWay}" Maximum="1000" Minimum="400" Margin="0,0,18,0" TickFrequency="10" IsSnapToTickEnabled="True" Width="400"/>
</StackPanel>
<TextBlock FontFamily="/Resources/#Segoe Fluent Icons" FontSize="20" Grid.Column="0" VerticalAlignment="Center" Margin="24 0 16 0">
&#xe740;
</TextBlock>
</ItemsControl>
</Border>
<Border Style="{DynamicResource SettingGroupBox}" Padding="0" CornerRadius="5" Margin="0 30 0 0">
<StackPanel Orientation="Vertical">
<Border Style="{DynamicResource SettingGroupBox}" Margin="0" BorderThickness="0">
@ -753,6 +771,7 @@
</Border>
<StackPanel>
<Border Style="{DynamicResource SettingGroupBox}" Margin="0 12 0 18">
<ItemsControl Style="{StaticResource SettingGrid}">
<StackPanel Style="{StaticResource TextPanel}">
@ -765,6 +784,7 @@
</TextBlock>
</ItemsControl>
</Border>
</StackPanel>
</StackPanel>
</Grid>