mirror of
https://github.com/microsoft/PowerToys
synced 2025-09-02 07:25:10 +00:00
[Flyout][Hotfix]Appear next to the tray icon position (#23772)
* [Flyout]Appear next to the tray icon position * fix spellchecker
This commit is contained in:
@@ -171,16 +171,17 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
});
|
||||
|
||||
// open flyout
|
||||
ShellPage.SetOpenFlyoutCallback(() =>
|
||||
ShellPage.SetOpenFlyoutCallback((POINT? p) =>
|
||||
{
|
||||
this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, () =>
|
||||
{
|
||||
if (App.GetFlyoutWindow() == null)
|
||||
{
|
||||
App.SetFlyoutWindow(new FlyoutWindow());
|
||||
App.SetFlyoutWindow(new FlyoutWindow(p));
|
||||
}
|
||||
|
||||
FlyoutWindow flyout = App.GetFlyoutWindow();
|
||||
flyout.FlyoutAppearPosition = p;
|
||||
flyout.Activate();
|
||||
|
||||
// https://github.com/microsoft/microsoft-ui-xaml/issues/7595 - Activate doesn't bring window to the foreground
|
||||
@@ -196,7 +197,7 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
{
|
||||
if (App.GetFlyoutWindow() == null)
|
||||
{
|
||||
App.SetFlyoutWindow(new FlyoutWindow());
|
||||
App.SetFlyoutWindow(new FlyoutWindow(null));
|
||||
}
|
||||
|
||||
App.GetFlyoutWindow().ViewModel.DisableHiding();
|
||||
|
Reference in New Issue
Block a user