mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Fixed hide on startup problem (#852)
* Fixed HideOnStartup * Fixed tray icon not showing up and hiding properly
This commit is contained in:
@@ -60,10 +60,7 @@ namespace Wox
|
|||||||
AutoStartup();
|
AutoStartup();
|
||||||
AutoUpdates();
|
AutoUpdates();
|
||||||
|
|
||||||
if (!_settings.HideOnStartup)
|
mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Hidden : Visibility.Visible;
|
||||||
{
|
|
||||||
mainVM.MainWindowVisibility = Visibility.Visible;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,7 +99,7 @@ namespace Wox
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// let exception throw as normal is better for Debug
|
/// let exception throw as normal is better for Debug
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Conditional("RELEASE")]
|
[Conditional("RELEASE")]
|
||||||
private void RegisterDispatcherUnhandledException()
|
private void RegisterDispatcherUnhandledException()
|
||||||
@@ -113,7 +110,7 @@ namespace Wox
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// let exception throw as normal is better for Debug
|
/// let exception throw as normal is better for Debug
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Conditional("RELEASE")]
|
[Conditional("RELEASE")]
|
||||||
private static void RegisterAppDomainExceptions()
|
private static void RegisterAppDomainExceptions()
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
Icon="Images\app.png"
|
Icon="Images\app.png"
|
||||||
AllowsTransparency="True"
|
AllowsTransparency="True"
|
||||||
Loaded="OnLoaded"
|
Loaded="OnLoaded"
|
||||||
|
Initialized="OnInitialized"
|
||||||
Closing="OnClosing"
|
Closing="OnClosing"
|
||||||
Drop="OnDrop"
|
Drop="OnDrop"
|
||||||
SizeChanged="OnSizeChanged"
|
SizeChanged="OnSizeChanged"
|
||||||
|
|||||||
@@ -46,11 +46,16 @@ namespace Wox
|
|||||||
_viewModel.Save();
|
_viewModel.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnInitialized(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// show notify icon when wox is hided
|
||||||
|
InitializeNotifyIcon();
|
||||||
|
}
|
||||||
|
|
||||||
private void OnLoaded(object sender, RoutedEventArgs _)
|
private void OnLoaded(object sender, RoutedEventArgs _)
|
||||||
{
|
{
|
||||||
WindowIntelopHelper.DisableControlBox(this);
|
WindowIntelopHelper.DisableControlBox(this);
|
||||||
ThemeManager.Instance.ChangeTheme(_settings.Theme);
|
ThemeManager.Instance.ChangeTheme(_settings.Theme);
|
||||||
InitializeNotifyIcon();
|
|
||||||
InitProgressbarAnimation();
|
InitProgressbarAnimation();
|
||||||
|
|
||||||
_viewModel.PropertyChanged += (o, e) =>
|
_viewModel.PropertyChanged += (o, e) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user