mirror of
https://github.com/microsoft/PowerToys
synced 2025-09-01 06:55:17 +00:00
[settings] Fix OOBE size and make it non-resizable & Bring back Settings window placement preserve logic (#17822)
* Fix OOBE size and make it non-resizable Bring back Settings window placement preserve logic * Disable OOBE maximize&minimize * expect.txt * Remove uneeded line * Remove uneeded check * Add brackets
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using Microsoft.PowerLauncher.Telemetry;
|
||||
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
|
||||
using Microsoft.PowerToys.Settings.UI.Views;
|
||||
using Microsoft.PowerToys.Telemetry;
|
||||
@@ -34,6 +36,9 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
AppWindow appWindow = AppWindow.GetFromWindowId(windowId);
|
||||
appWindow.SetIcon("icon.ico");
|
||||
|
||||
var placement = Utils.DeserializePlacementOrDefault(hWnd);
|
||||
NativeMethods.SetWindowPlacement(hWnd, ref placement);
|
||||
|
||||
ResourceLoader loader = ResourceLoader.GetForViewIndependentUse();
|
||||
Title = loader.GetString("SettingsWindow_Title");
|
||||
|
||||
@@ -103,6 +108,9 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
private void Window_Closed(object sender, WindowEventArgs args)
|
||||
{
|
||||
App.ClearSettingsWindow();
|
||||
|
||||
var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
|
||||
Utils.SerializePlacement(hWnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user