mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Revert "- Remove visible/collapsed code (only using opacity)"
This reverts commit e282fc5d38.
This commit is contained in:
parent
e282fc5d38
commit
4df1e418d7
2 changed files with 15 additions and 2 deletions
|
|
@ -348,12 +348,16 @@ namespace Flow.Launcher
|
|||
private async void OnContextMenusForSettingsClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_viewModel.Hide();
|
||||
await Task.Delay(50);
|
||||
App.API.OpenSettingDialog();
|
||||
}
|
||||
|
||||
|
||||
private async void OnDeactivated(object sender, EventArgs e)
|
||||
{
|
||||
// need time to initialize the main query window animation
|
||||
if (_settings.UseAnimation)
|
||||
await Task.Delay(50);
|
||||
if (_settings.HideWhenDeactive)
|
||||
{
|
||||
_viewModel.Hide();
|
||||
|
|
|
|||
|
|
@ -702,7 +702,7 @@ namespace Flow.Launcher.ViewModel
|
|||
public void Show()
|
||||
{
|
||||
((MainWindow)Application.Current.MainWindow).WindowAnimator();
|
||||
//MainWindowVisibility = Visibility.Visible;
|
||||
MainWindowVisibility = Visibility.Visible;
|
||||
WinToggleStatus = true;
|
||||
MainWindowOpacity = 1;
|
||||
}
|
||||
|
|
@ -714,20 +714,29 @@ namespace Flow.Launcher.ViewModel
|
|||
case LastQueryMode.Empty:
|
||||
ChangeQueryText(string.Empty);
|
||||
MainWindowOpacity = 0; // Trick for no delay
|
||||
await Task.Delay(50); //Time for change to opacity
|
||||
break;
|
||||
case LastQueryMode.Preserved:
|
||||
MainWindowOpacity = 0;
|
||||
if (_settings.UseAnimation)
|
||||
{
|
||||
await Task.Delay(50);
|
||||
}
|
||||
LastQuerySelected = true;
|
||||
break;
|
||||
case LastQueryMode.Selected:
|
||||
MainWindowOpacity = 0;
|
||||
if (_settings.UseAnimation)
|
||||
{
|
||||
await Task.Delay(50);
|
||||
}
|
||||
LastQuerySelected = false;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>");
|
||||
}
|
||||
WinToggleStatus = false;
|
||||
MainWindowOpacity = 0;
|
||||
MainWindowVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
|||
Loading…
Reference in a new issue