mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Adjust Width in Theme.cs
This commit is contained in:
parent
616e98af60
commit
6af1262ca6
5 changed files with 9 additions and 7 deletions
|
|
@ -191,7 +191,7 @@ namespace Flow.Launcher.Core.Resource
|
|||
}
|
||||
|
||||
var windowStyle = dict["WindowStyle"] as Style;
|
||||
|
||||
/*
|
||||
var width = windowStyle?.Setters.OfType<Setter>().Where(x => x.Property.Name == "Width")
|
||||
.Select(x => x.Value).FirstOrDefault();
|
||||
|
||||
|
|
@ -202,9 +202,10 @@ namespace Flow.Launcher.Core.Resource
|
|||
width = windowStyle?.Setters.OfType<Setter>().Where(x => x.Property.Name == "Width")
|
||||
.Select(x => x.Value).FirstOrDefault();
|
||||
}
|
||||
|
||||
*/
|
||||
var width = Settings.WindowSize;
|
||||
windowStyle.Setters.Add(new Setter(Window.WidthProperty, width));
|
||||
mainWindowWidth = (double)width;
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
windowsize = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public string Language
|
||||
|
|
|
|||
|
|
@ -683,7 +683,7 @@
|
|||
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"/>
|
||||
<Slider Name="WindowWidthValue" Value="{Binding Settings.WindowSize, Mode=TwoWay}" Maximum="900" 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">
|
||||

|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:userSettings="clr-namespace:Flow.Launcher">
|
||||
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure">
|
||||
|
||||
<!-- Further font customisations are dynamically loaded in Theme.cs -->
|
||||
<Style x:Key="BaseQueryBoxStyle" TargetType="{x:Type TextBox}">
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
<Setter Property="CornerRadius" Value="5" />
|
||||
</Style>
|
||||
<Style x:Key="BaseWindowStyle" TargetType="{x:Type Window}">
|
||||
<Setter Property="Width" Value="{Binding WindowWidthSize.windowsize" />
|
||||
<Setter Property="Width" Value="600" />
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
</Style>
|
||||
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ namespace Flow.Launcher.ViewModel
|
|||
public double WindowWidthSize
|
||||
{
|
||||
get { return Settings.WindowSize; }
|
||||
set { Settings.WindowSize = value; }
|
||||
set { Settings.WindowSize = value;}
|
||||
}
|
||||
|
||||
public bool UseGlyphIcons
|
||||
|
|
|
|||
Loading…
Reference in a new issue