mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +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:
@@ -6,6 +6,7 @@ using System;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using ManagedCommon;
|
||||
using Microsoft.Win32;
|
||||
using Wox.Infrastructure.Image;
|
||||
using Wox.Infrastructure.UserSettings;
|
||||
@@ -50,7 +51,7 @@ namespace PowerLauncher.Helper
|
||||
|
||||
private void SetSystemTheme(ManagedCommon.Theme theme)
|
||||
{
|
||||
_mainWindow.Background = Common.UI.OSVersionHelper.IsWindows11() is false ? SystemColors.WindowBrush : null;
|
||||
_mainWindow.Background = OSVersionHelper.IsWindows11() is false ? SystemColors.WindowBrush : null;
|
||||
|
||||
_mainWindow.Resources.MergedDictionaries.Clear();
|
||||
_mainWindow.Resources.MergedDictionaries.Add(new ResourceDictionary
|
||||
@@ -66,7 +67,7 @@ namespace PowerLauncher.Helper
|
||||
Source = new Uri(themeString, UriKind.Absolute),
|
||||
};
|
||||
_mainWindow.Resources.MergedDictionaries.Add(fluentThemeDictionary);
|
||||
if (!Common.UI.OSVersionHelper.IsWindows11())
|
||||
if (!OSVersionHelper.IsWindows11())
|
||||
{
|
||||
// Apply background only on Windows 10
|
||||
// Windows theme does not work properly for dark and light mode so right now set the background color manual.
|
||||
@@ -95,7 +96,7 @@ namespace PowerLauncher.Helper
|
||||
{
|
||||
Source = new Uri(styleThemeString, UriKind.Relative),
|
||||
});
|
||||
if (Common.UI.OSVersionHelper.IsWindows11())
|
||||
if (OSVersionHelper.IsWindows11())
|
||||
{
|
||||
// Apply background only on Windows 11 to keep the same style as WPFUI
|
||||
_mainWindow.Background = new SolidColorBrush
|
||||
|
||||
@@ -15,6 +15,7 @@ using System.Windows.Interop;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
using Common.UI;
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerLauncher.Telemetry;
|
||||
using Microsoft.PowerToys.Telemetry;
|
||||
using PowerLauncher.Helper;
|
||||
|
||||
@@ -7,8 +7,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
using Common.UI;
|
||||
using ManagedCommon;
|
||||
using Microsoft.Win32;
|
||||
using Wox.Plugin.Common.VirtualDesktop.Interop;
|
||||
using Wox.Plugin.Common.Win32;
|
||||
|
||||
Reference in New Issue
Block a user