[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:
Stefan Markovic
2022-04-20 17:08:25 +02:00
committed by GitHub
parent 40300c1e4f
commit b3c520ed54
4 changed files with 70 additions and 0 deletions

View File

@@ -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();