Fix hotkey size change issue

This commit is contained in:
Jack251970 2025-03-29 16:03:41 +08:00
parent 78b661733d
commit 714860e416
2 changed files with 5 additions and 5 deletions

View file

@ -10,7 +10,7 @@
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
Name="FlowMainWindow"
Title="Flow Launcher"
Width="{Binding MainWindowWidth, Mode=OneWay}"
Width="{Binding MainWindowWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
MinWidth="400"
MinHeight="30"
d:DataContext="{d:DesignInstance Type=vm:MainViewModel}"

View file

@ -584,7 +584,7 @@ namespace Flow.Launcher.ViewModel
[RelayCommand]
private void IncreaseWidth()
{
Settings.WindowSize += 100;
MainWindowWidth += 100;
Settings.WindowLeft -= 50;
OnPropertyChanged(nameof(MainWindowWidth));
}
@ -592,14 +592,14 @@ namespace Flow.Launcher.ViewModel
[RelayCommand]
private void DecreaseWidth()
{
if (MainWindowWidth - 100 < 400 || Settings.WindowSize == 400)
if (MainWindowWidth - 100 < 400 || MainWindowWidth == 400)
{
Settings.WindowSize = 400;
MainWindowWidth = 400;
}
else
{
MainWindowWidth -= 100;
Settings.WindowLeft += 50;
Settings.WindowSize -= 100;
}
OnPropertyChanged(nameof(MainWindowWidth));