mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[CmdPal] MinWidth/Height and DPI-aware launch dimensions (#38637)
* MinWidth/Height and DPI-aware launch dimensions * Making MainWindow DPI aware too * Moving toastwindow to WinUIEx too * Update MainWindow.xaml.cs * Reverting back to the working logic * Localizing settings window title * Xaml formatting * Update SettingsWindow.xaml.cs
This commit is contained in:
@@ -11,11 +11,12 @@ using Microsoft.UI.Windowing;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Windows.Graphics;
|
||||
using WinUIEx;
|
||||
using RS_ = Microsoft.CmdPal.UI.Helpers.ResourceLoaderInstance;
|
||||
|
||||
namespace Microsoft.CmdPal.UI.Settings;
|
||||
|
||||
public sealed partial class SettingsWindow : Window,
|
||||
public sealed partial class SettingsWindow : WindowEx,
|
||||
IRecipient<NavigateToExtensionSettingsMessage>,
|
||||
IRecipient<QuitMessage>
|
||||
{
|
||||
@@ -70,7 +71,6 @@ public sealed partial class SettingsWindow : Window,
|
||||
|
||||
private void PositionCentered()
|
||||
{
|
||||
AppWindow.Resize(new SizeInt32 { Width = 1280, Height = 720 });
|
||||
var displayArea = DisplayArea.GetFromWindowId(AppWindow.Id, DisplayAreaFallback.Nearest);
|
||||
if (displayArea is not null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user