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
/// A `Boolean` for if the OS / Chromium currently has a dark mode enabled or is
36
-
/// being instructed to show a dark-style UI.If you want to modify this value you
37
-
/// should use `themeSource` below.
38
+
/// Setting this property to <see cref="ThemeSourceMode.System"/> will remove the override and everything will be reset to the OS default. By default 'ThemeSource' is <see cref="ThemeSourceMode.System"/>.
39
+
/// <para/>
40
+
/// Settings this property to <see cref="ThemeSourceMode.Dark"/> will have the following effects:
41
+
/// <list type="bullet">
42
+
/// <item>
43
+
/// <description><see cref="ShouldUseDarkColorsAsync"/> will be <see langword="true"/> when accessed</description>
44
+
/// </item>
45
+
/// <item>
46
+
/// <description>Any UI Electron renders on Linux and Windows including context menus, devtools, etc. will use the dark UI.</description>
47
+
/// </item>
48
+
/// <item>
49
+
/// <description>Any UI the OS renders on macOS including menus, window frames, etc. will use the dark UI.</description>
50
+
/// </item>
51
+
/// <item>
52
+
/// <description>The 'prefers-color-scheme' CSS query will match 'dark' mode.</description>
53
+
/// </item>
54
+
/// <item>
55
+
/// <description>The 'updated' event will be emitted</description>
56
+
/// </item>
57
+
/// </list>
58
+
/// <para/>
59
+
/// Settings this property to <see cref="ThemeSourceMode.Light"/> will have the following effects:
60
+
/// <list type="bullet">
61
+
/// <item>
62
+
/// <description><see cref="ShouldUseDarkColorsAsync"/> will be <see langword="false"/> when accessed</description>
63
+
/// </item>
64
+
/// <item>
65
+
/// <description>Any UI Electron renders on Linux and Windows including context menus, devtools, etc. will use the light UI.</description>
66
+
/// </item>
67
+
/// <item>
68
+
/// <description>Any UI the OS renders on macOS including menus, window frames, etc. will use the light UI.</description>
69
+
/// </item>
70
+
/// <item>
71
+
/// <description>The 'prefers-color-scheme' CSS query will match 'light' mode.</description>
72
+
/// </item>
73
+
/// <item>
74
+
/// <description>The 'updated' event will be emitted</description>
75
+
/// </item>
76
+
/// </list>
77
+
/// The usage of this property should align with a classic "dark mode" state machine in your application where the user has three options.
/// A <see cref="ThemeSourceMode"/> property that can be <see cref="ThemeSourceMode.System"/>, <see cref="ThemeSourceMode.Light"/> or <see cref="ThemeSourceMode.Dark"/>. It is used to override (<seealso cref="SetThemeSource"/>) and
102
+
/// supercede the value that Chromium has chosen to use internally.
/// Emitted when something in the underlying NativeTheme has changed. This normally means that either the value of <see cref="ShouldUseDarkColorsAsync"/>,
182
+
/// <see cref="ShouldUseHighContrastColorsAsync"/> or <see cref="ShouldUseInvertedColorSchemeAsync"/> has changed. You will have to check them to determine which one has changed.
0 commit comments