mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix Max/Min Logic
This commit is contained in:
parent
83262dea78
commit
833857d940
1 changed files with 18 additions and 6 deletions
|
|
@ -363,18 +363,30 @@ namespace Flow.Launcher.ViewModel
|
|||
[RelayCommand]
|
||||
private void IncreaseWidth()
|
||||
{
|
||||
if (_settings.WindowSize > 1920) return;
|
||||
_settings.WindowSize += 100;
|
||||
Left -= 50;
|
||||
if (MainWindowWidth + 100 > 1920 || _settings.WindowSize == 1920)
|
||||
{
|
||||
_settings.WindowSize = 1920;
|
||||
}
|
||||
else
|
||||
{
|
||||
_settings.WindowSize += 100;
|
||||
Left -= 50;
|
||||
}
|
||||
OnPropertyChanged();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void DecreaseWidth()
|
||||
{
|
||||
if (_settings.WindowSize < 400) return;
|
||||
Left += 50;
|
||||
_settings.WindowSize -= 100;
|
||||
if (MainWindowWidth - 100 < 400 || _settings.WindowSize == 400)
|
||||
{
|
||||
_settings.WindowSize = 400;
|
||||
}
|
||||
else
|
||||
{
|
||||
Left += 50;
|
||||
_settings.WindowSize -= 100;
|
||||
}
|
||||
OnPropertyChanged();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue