mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Fixed GTK3 theme switching on Win32 so fallback window CSS is synchronized immediately when switching back to the system theme (theme_name == NULL) by calling fe_apply_windows_theme(dark) in that path before provider cleanup.
Fixed GTK3 theme activation on Win32 so fallback window CSS is disabled immediately after loading an imported GTK3 theme, preventing mixed styling (like unthemed buttons/chat areas) during runtime theme changes
This commit is contained in:
@@ -756,6 +756,12 @@ fe_apply_gtk3_theme_with_reload (const char *theme_name, gboolean force_reload,
|
||||
|
||||
if (!theme_name || !*theme_name)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
/* Keep the Win32 fallback provider in sync when returning to the
|
||||
* system theme from Preferences > Themes. */
|
||||
fe_apply_windows_theme (dark);
|
||||
#endif
|
||||
|
||||
if (gtk3_theme_provider && screen)
|
||||
{
|
||||
gtk_style_context_remove_provider_for_screen (
|
||||
@@ -842,6 +848,12 @@ fe_apply_gtk3_theme_with_reload (const char *theme_name, gboolean force_reload,
|
||||
gtk_style_context_reset_widgets (screen);
|
||||
}
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
/* Applying a GTK3 theme should immediately disable ZoiteChat's Win32
|
||||
* fallback window CSS so buttons/chat widgets are fully theme-driven. */
|
||||
fe_apply_windows_theme (dark);
|
||||
#endif
|
||||
|
||||
g_free (gtk3_theme_provider_name);
|
||||
gtk3_theme_provider_name = g_strdup (theme_name);
|
||||
gtk3_theme_provider_dark = dark;
|
||||
|
||||
Reference in New Issue
Block a user