mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02:00
[PowerToys Run] Plugin manager (#9872)
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Globalization;
|
||||
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.Toolkit.Win32.UI.XamlHost;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI
|
||||
@@ -18,5 +20,15 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
var coreWindowInterop = Interop.GetInterop(coreWindow);
|
||||
NativeMethods.ShowWindow(coreWindowInterop.WindowHandle, Interop.SW_HIDE);
|
||||
}
|
||||
|
||||
public static bool IsDarkTheme()
|
||||
{
|
||||
var selectedTheme = SettingsRepository<GeneralSettings>.GetInstance(settingsUtils).SettingsConfig.Theme.ToUpper(CultureInfo.InvariantCulture);
|
||||
var defaultTheme = new Windows.UI.ViewManagement.UISettings();
|
||||
var uiTheme = defaultTheme.GetColorValue(Windows.UI.ViewManagement.UIColorType.Background).ToString(System.Globalization.CultureInfo.InvariantCulture);
|
||||
return selectedTheme == "DARK" || (selectedTheme == "SYSTEM" && uiTheme == "#FF000000");
|
||||
}
|
||||
|
||||
private static ISettingsUtils settingsUtils = new SettingsUtils();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user