mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
add Opacity value
This commit is contained in:
parent
5d670194fe
commit
abf91dc8cb
2 changed files with 28 additions and 3 deletions
|
|
@ -60,8 +60,8 @@ namespace Flow.Launcher.Helper
|
||||||
if (!ShouldIgnoreHotkeys())
|
if (!ShouldIgnoreHotkeys())
|
||||||
{
|
{
|
||||||
UpdateLastQUeryMode();
|
UpdateLastQUeryMode();
|
||||||
|
mainViewModel.ToggleFlowLauncherOpacity();
|
||||||
var overlayTask = Task.Delay(20).ContinueWith(_ => {
|
var overlayTask = Task.Delay(30).ContinueWith(_ => {
|
||||||
mainViewModel.ToggleFlowLauncher();
|
mainViewModel.ToggleFlowLauncher();
|
||||||
}, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
|
}, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ using Flow.Launcher.Infrastructure.Hotkey;
|
||||||
using Flow.Launcher.Infrastructure.Storage;
|
using Flow.Launcher.Infrastructure.Storage;
|
||||||
using Flow.Launcher.Infrastructure.UserSettings;
|
using Flow.Launcher.Infrastructure.UserSettings;
|
||||||
using Flow.Launcher.Plugin;
|
using Flow.Launcher.Plugin;
|
||||||
|
using Flow.Launcher.Helper;
|
||||||
using Flow.Launcher.Plugin.SharedCommands;
|
using Flow.Launcher.Plugin.SharedCommands;
|
||||||
using Flow.Launcher.Storage;
|
using Flow.Launcher.Storage;
|
||||||
using Flow.Launcher.Infrastructure.Logger;
|
using Flow.Launcher.Infrastructure.Logger;
|
||||||
|
|
@ -156,7 +157,15 @@ namespace Flow.Launcher.ViewModel
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainWindowVisibility = Visibility.Collapsed;
|
|
||||||
|
|
||||||
|
Application.Current.MainWindow.Opacity = 0;
|
||||||
|
|
||||||
|
var overlayTask = Task.Delay(30).ContinueWith(_ => {
|
||||||
|
MainWindowVisibility = Visibility.Collapsed;
|
||||||
|
}, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -664,14 +673,30 @@ namespace Flow.Launcher.ViewModel
|
||||||
{
|
{
|
||||||
if (MainWindowVisibility != Visibility.Visible)
|
if (MainWindowVisibility != Visibility.Visible)
|
||||||
{
|
{
|
||||||
|
|
||||||
MainWindowVisibility = Visibility.Visible;
|
MainWindowVisibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
MainWindowVisibility = Visibility.Collapsed;
|
MainWindowVisibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void ToggleFlowLauncherOpacity()
|
||||||
|
{
|
||||||
|
if (MainWindowVisibility != Visibility.Visible)
|
||||||
|
{
|
||||||
|
|
||||||
|
Application.Current.MainWindow.Opacity = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
Application.Current.MainWindow.Opacity = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue