mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #2733 from onesounds/240528_FixSize
Fix Saving Window Width
This commit is contained in:
commit
3b540e0adc
3 changed files with 9 additions and 10 deletions
|
|
@ -13,7 +13,7 @@
|
||||||
Name="FlowMainWindow"
|
Name="FlowMainWindow"
|
||||||
Title="Flow Launcher"
|
Title="Flow Launcher"
|
||||||
Width="{Binding MainWindowWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
Width="{Binding MainWindowWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
MinWidth="430"
|
MinWidth="400"
|
||||||
MinHeight="30"
|
MinHeight="30"
|
||||||
d:DataContext="{d:DesignInstance Type=vm:MainViewModel}"
|
d:DataContext="{d:DesignInstance Type=vm:MainViewModel}"
|
||||||
AllowDrop="True"
|
AllowDrop="True"
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
Deactivated="OnDeactivated"
|
Deactivated="OnDeactivated"
|
||||||
Icon="Images/app.png"
|
Icon="Images/app.png"
|
||||||
Initialized="OnInitialized"
|
Initialized="OnInitialized"
|
||||||
|
Left="{Binding Settings.WindowLeft, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Loaded="OnLoaded"
|
Loaded="OnLoaded"
|
||||||
LocationChanged="OnLocationChanged"
|
LocationChanged="OnLocationChanged"
|
||||||
Opacity="{Binding MainWindowOpacity, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
Opacity="{Binding MainWindowOpacity, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
|
|
||||||
|
|
@ -173,12 +173,6 @@ public partial class SettingsPaneThemeViewModel : BaseModel
|
||||||
|
|
||||||
public string DateText => DateTime.Now.ToString(DateFormat, CultureInfo.CurrentCulture);
|
public string DateText => DateTime.Now.ToString(DateFormat, CultureInfo.CurrentCulture);
|
||||||
|
|
||||||
public double WindowWidthSize
|
|
||||||
{
|
|
||||||
get => Settings.WindowSize;
|
|
||||||
set => Settings.WindowSize = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool UseGlyphIcons
|
public bool UseGlyphIcons
|
||||||
{
|
{
|
||||||
get => Settings.UseGlyphIcons;
|
get => Settings.UseGlyphIcons;
|
||||||
|
|
|
||||||
|
|
@ -538,7 +538,7 @@ namespace Flow.Launcher.ViewModel
|
||||||
{
|
{
|
||||||
Settings.WindowSize += 100;
|
Settings.WindowSize += 100;
|
||||||
Settings.WindowLeft -= 50;
|
Settings.WindowLeft -= 50;
|
||||||
OnPropertyChanged();
|
OnPropertyChanged(nameof(MainWindowWidth));
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
|
|
@ -554,7 +554,7 @@ namespace Flow.Launcher.ViewModel
|
||||||
Settings.WindowSize -= 100;
|
Settings.WindowSize -= 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
OnPropertyChanged();
|
OnPropertyChanged(nameof(MainWindowWidth));
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
|
|
@ -706,7 +706,11 @@ namespace Flow.Launcher.ViewModel
|
||||||
public double MainWindowWidth
|
public double MainWindowWidth
|
||||||
{
|
{
|
||||||
get => Settings.WindowSize;
|
get => Settings.WindowSize;
|
||||||
set => Settings.WindowSize = value;
|
set
|
||||||
|
{
|
||||||
|
if (!MainWindowVisibilityStatus) return;
|
||||||
|
Settings.WindowSize = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public double MainWindowHeight
|
public double MainWindowHeight
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue