mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[WinUI3]Fix Windows 10 title bar borders (#36429)
* Fix borders for windows in the Settings UI * Fix HOSTS window * Fix Advanced Paste * Fix Environment Variables * Fix File Locksmith * Fix Peek, with a caveat * Fix Registry Preview * Remove unused imports * Clean up imports in OobeShellPage * Move OSVersionHelper from Common.UI up into ManagedCommon
This commit is contained in:
@@ -48,7 +48,8 @@ namespace Peek.UI
|
||||
ViewModel = Application.Current.GetService<MainWindowViewModel>();
|
||||
|
||||
TitleBarControl.SetTitleBarToWindow(this);
|
||||
AppWindow.TitleBar.ExtendsContentIntoTitleBar = true;
|
||||
ExtendsContentIntoTitleBar = true;
|
||||
WindowHelpers.ForceTopBorder1PixelInsetOnWindows10(this.GetWindowHandle());
|
||||
AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Tall;
|
||||
AppWindow.SetIcon("Assets/Peek/Icon.ico");
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace Peek.UI.Views
|
||||
if (AppWindowTitleBar.IsCustomizationSupported())
|
||||
{
|
||||
AppWindow appWindow = mainWindow.AppWindow;
|
||||
appWindow.TitleBar.ExtendsContentIntoTitleBar = true;
|
||||
mainWindow.ExtendsContentIntoTitleBar = true;
|
||||
appWindow.TitleBar.ButtonBackgroundColor = Colors.Transparent;
|
||||
appWindow.TitleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
|
||||
appWindow.TitleBar.ButtonForegroundColor = ThemeHelpers.GetAppTheme() == AppTheme.Light ? Colors.DarkSlateGray : Colors.White;
|
||||
|
||||
Reference in New Issue
Block a user