mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-18 11:40:18 +00:00
Updated gtkutil_menu_icon_theme_variant() to select the menu icon theme variant from the app’s effective dark-mode state first (fe_dark_mode_state_is_initialized() + fe_dark_mode_is_enabled()), and only use GTK/theme-name heuristics as fallback before app state is initialized. This preserves the existing light-asset fallback behavior in menu icon loading logic.
Added a new frontend helper declaration fe_dark_mode_state_is_initialized() in the GTK frontend header so callers can check whether dark-mode state is ready. Implemented dark-mode initialization tracking in fe-gtk.c via a new static flag, set when auto mode state is externally set and during fe_init(), and exposed it through fe_dark_mode_state_is_initialized().
This commit is contained in:
@@ -251,6 +251,9 @@ gtkutil_menu_icon_theme_variant (void)
|
||||
char *theme_name_lower = NULL;
|
||||
const char *theme_variant = "light";
|
||||
|
||||
if (fe_dark_mode_state_is_initialized ())
|
||||
return fe_dark_mode_is_enabled () ? "dark" : "light";
|
||||
|
||||
settings = gtk_settings_get_default ();
|
||||
if (settings)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user