diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 788c3c597c2..2b10f79b3a5 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -13,7 +13,7 @@ Name="FlowMainWindow" Title="Flow Launcher" Width="{Binding MainWindowWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" - MinWidth="430" + MinWidth="400" MinHeight="30" d:DataContext="{d:DesignInstance Type=vm:MainViewModel}" AllowDrop="True" @@ -23,6 +23,7 @@ Deactivated="OnDeactivated" Icon="Images/app.png" Initialized="OnInitialized" + Left="{Binding Settings.WindowLeft, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Loaded="OnLoaded" LocationChanged="OnLocationChanged" Opacity="{Binding MainWindowOpacity, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs index 667d0b72678..5046a475481 100644 --- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs +++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs @@ -173,12 +173,6 @@ public bool KeepMaxResults public string DateText => DateTime.Now.ToString(DateFormat, CultureInfo.CurrentCulture); - public double WindowWidthSize - { - get => Settings.WindowSize; - set => Settings.WindowSize = value; - } - public bool UseGlyphIcons { get => Settings.UseGlyphIcons; diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 291dd9a973e..dcca3fb1a5c 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -538,7 +538,7 @@ private void IncreaseWidth() { Settings.WindowSize += 100; Settings.WindowLeft -= 50; - OnPropertyChanged(); + OnPropertyChanged(nameof(MainWindowWidth)); } [RelayCommand] @@ -554,7 +554,7 @@ private void DecreaseWidth() Settings.WindowSize -= 100; } - OnPropertyChanged(); + OnPropertyChanged(nameof(MainWindowWidth)); } [RelayCommand] @@ -706,7 +706,11 @@ private ResultsViewModel SelectedResults public double MainWindowWidth { get => Settings.WindowSize; - set => Settings.WindowSize = value; + set + { + if (!MainWindowVisibilityStatus) return; + Settings.WindowSize = value; + } } public double MainWindowHeight