mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02: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:
@@ -10,6 +10,7 @@ using Microsoft.UI;
|
||||
using Microsoft.UI.Windowing;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Windows.ApplicationModel.Resources;
|
||||
using Windows.Graphics;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI
|
||||
{
|
||||
@@ -30,6 +31,16 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
AppWindow appWindow = AppWindow.GetFromWindowId(windowId);
|
||||
appWindow.SetIcon("icon.ico");
|
||||
|
||||
OverlappedPresenter presenter = appWindow.Presenter as OverlappedPresenter;
|
||||
presenter.IsResizable = false;
|
||||
presenter.IsMinimizable = false;
|
||||
presenter.IsMaximizable = false;
|
||||
|
||||
SizeInt32 size;
|
||||
size.Width = 1650;
|
||||
size.Height = 1050;
|
||||
appWindow.Resize(size);
|
||||
|
||||
this.initialModule = initialModule;
|
||||
|
||||
ResourceLoader loader = ResourceLoader.GetForViewIndependentUse();
|
||||
|
||||
Reference in New Issue
Block a user