mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[CmdPal] Settings UI polishing (#38094)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Settings window UI polishing: - Make the navigation view toggle button move in the title bar when navigation view mode is compact or minimal - Center settings card in the window - Properly set windows icon in order to make it visible in task manager and task view _main branch_   _PR_   <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] **Closes:**: https://github.com/zadjii-msft/PowerToys/issues/581 --------- Co-authored-by: Niels Laute <niels.laute@live.nl>
This commit is contained in:
committed by
GitHub
parent
4e7bd34c4d
commit
a9a41ca1a2
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.UI;
|
||||
using Microsoft.UI.Windowing;
|
||||
using Microsoft.UI.Xaml;
|
||||
|
||||
namespace Microsoft.CmdPal.UI.Helpers;
|
||||
|
||||
public static class WindowExtensions
|
||||
{
|
||||
public static void SetIcon(this Window window)
|
||||
{
|
||||
var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window);
|
||||
WindowId windowId = Win32Interop.GetWindowIdFromWindow(hWnd);
|
||||
AppWindow appWindow = AppWindow.GetFromWindowId(windowId);
|
||||
appWindow.SetIcon(@"Assets\icon.ico");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user