mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-18 03:30:18 +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:
@@ -211,6 +211,8 @@ gboolean fe_dark_mode_is_enabled (void);
|
||||
gboolean fe_dark_mode_is_enabled_for (unsigned int mode);
|
||||
void fe_set_auto_dark_mode_state (gboolean enabled);
|
||||
void fe_refresh_auto_dark_mode (void);
|
||||
gboolean fe_apply_theme_for_mode (unsigned int mode, gboolean *palette_changed);
|
||||
void fe_apply_theme_to_toplevel (GtkWidget *window);
|
||||
|
||||
#define SPELL_ENTRY_GET_TEXT(e) ((char *)(gtk_entry_get_text (GTK_ENTRY(e))))
|
||||
#define SPELL_ENTRY_SET_TEXT(e,txt) gtk_entry_set_text(GTK_ENTRY(e),txt)
|
||||
|
||||
Reference in New Issue
Block a user