mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use Hacky way to show up windows when width change.
Clear query to prevent large area of window preventing user change width.
This commit is contained in:
parent
08c643adcc
commit
64a489b312
2 changed files with 14 additions and 7 deletions
|
|
@ -52,6 +52,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
private ChannelWriter<ResultsForUpdate> _resultsUpdateChannelWriter;
|
||||
private Task _resultsViewUpdateTask;
|
||||
private bool _keepVisibility = false;
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
@ -64,10 +65,20 @@ namespace Flow.Launcher.ViewModel
|
|||
_lastQuery = new Query();
|
||||
|
||||
_settings = settings;
|
||||
_settings.PropertyChanged += (_, args) =>
|
||||
_settings.PropertyChanged += async (_, args) =>
|
||||
{
|
||||
if (args.PropertyName == nameof(Settings.WindowSize))
|
||||
{
|
||||
ChangeQueryText("");
|
||||
if (MainWindowVisibility == Visibility.Collapsed)
|
||||
{
|
||||
ToggleFlowLauncher();
|
||||
_keepVisibility = true;
|
||||
await Task.Delay(1000);
|
||||
_keepVisibility = false;
|
||||
Application.Current.MainWindow.Activate();
|
||||
}
|
||||
|
||||
OnPropertyChanged(nameof(MainWindowWidth));
|
||||
}
|
||||
};
|
||||
|
|
@ -742,7 +753,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
public void Hide()
|
||||
{
|
||||
if (MainWindowVisibility != Visibility.Collapsed)
|
||||
if (MainWindowVisibility != Visibility.Collapsed && !_keepVisibility)
|
||||
{
|
||||
ToggleFlowLauncher();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -309,11 +309,7 @@ namespace Flow.Launcher.ViewModel
|
|||
public double WindowWidthSize
|
||||
{
|
||||
get => Settings.WindowSize;
|
||||
set
|
||||
{
|
||||
Settings.WindowSize = value;
|
||||
Application.Current.MainWindow.Visibility = Visibility.Visible;
|
||||
}
|
||||
set => Settings.WindowSize = value;
|
||||
}
|
||||
|
||||
public bool UseGlyphIcons
|
||||
|
|
|
|||
Loading…
Reference in a new issue