You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static class ThemeService
{
public static void InitializeThemeListener()
{
var nativeTheme = Electron.NativeTheme;
nativeTheme.Updated += async () =>
{
var isDarkMode = await nativeTheme.ShouldUseDarkColorsAsync();
Console.WriteLine(isDarkMode
? $"OS theme changed. Dark Mode: {isDarkMode}"
: $"OS theme changed. Light Mode: {isDarkMode}");
};
}
}
The listener is triggered appropriately when I change the default theme on macOS Sequoia.
Am I misunderstanding how to check for OS initiated theme changes?
The text was updated successfully, but these errors were encountered:
The listener is triggered appropriately when I change the default theme on macOS Sequoia.
Am I misunderstanding how to check for OS initiated theme changes?
The text was updated successfully, but these errors were encountered: