mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-14 09:40:20 +00:00
Implemented a Windows-specific theme detection path with High Contrast safeguards, including helpers to detect HC mode, read Windows system theme preference from the registry, and gate native titlebar dark mode updates when HC is active. Also added DWM header usage for native titlebar APIs.
Added a unified theme application pipeline via fe_apply_theme_for_mode() and fe_apply_theme_to_toplevel(), and routed auto-mode refresh logic through it so palette + GTK input styling are applied consistently from one place. Switched startup and settings-apply flows to use the unified theming function, replacing direct palette-only calls so system-mode detection → theme apply is consistent across initialization and preferences changes. Applied native titlebar updates when top-level windows are shown and during setup reapply across open sessions, and wired Windows builds to link dwmapi in both Meson and MSVC project files.
This commit is contained in:
@@ -3059,7 +3059,9 @@ setup_apply (struct zoitechatprefs *pr)
|
||||
* the preference flips but the palette stays the same (aka: "nothing happens").
|
||||
*/
|
||||
{
|
||||
gboolean pal_changed = palette_apply_dark_mode (fe_dark_mode_is_enabled_for (prefs.hex_gui_dark_mode));
|
||||
gboolean pal_changed = FALSE;
|
||||
|
||||
fe_apply_theme_for_mode (prefs.hex_gui_dark_mode, &pal_changed);
|
||||
if (prefs.hex_gui_dark_mode != old_dark_mode || pal_changed)
|
||||
color_change = TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user