mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 16:00:18 +00:00
Fixed the GTK3 theme persistence bug in Preferences by syncing the in-dialog working copy (setup_prefs.hex_gui_gtk3_theme_name) whenever a GTK3 theme is applied, so pressing OK no longer overwrites the newly selected theme with stale state.
Fixed the same persistence path for “Use System GTK Theme” by clearing both prefs and setup_prefs, preventing the theme from reverting after the dialog closes.
Reverted GTK3 provider priority back to GTK_STYLE_PROVIDER_PRIORITY_THEME (from application priority), which addresses the dropdown/menu rendering regression introduced by the previous commit.
This commit is contained in:
@@ -2086,6 +2086,10 @@ setup_theme_apply_gtk3_cb (GtkWidget *button, gpointer user_data)
|
||||
}
|
||||
|
||||
safe_strcpy (prefs.hex_gui_gtk3_theme_name, theme, sizeof (prefs.hex_gui_gtk3_theme_name));
|
||||
/* Keep the Preferences working copy in sync so pressing OK does not
|
||||
* overwrite the just-selected theme with stale setup_prefs data. */
|
||||
safe_strcpy (setup_prefs.hex_gui_gtk3_theme_name, theme,
|
||||
sizeof (setup_prefs.hex_gui_gtk3_theme_name));
|
||||
save_config ();
|
||||
gtk_label_set_text (GTK_LABEL (ui->gtk3_status_label), _("GTK3 theme activated from ZoiteChat's local theme store."));
|
||||
setup_theme_show_message (GTK_MESSAGE_INFO, _("GTK3 theme activated and saved."));
|
||||
@@ -2100,6 +2104,7 @@ setup_theme_gtk3_use_system_cb (GtkWidget *button, gpointer user_data)
|
||||
|
||||
fe_apply_gtk3_theme (NULL, NULL);
|
||||
prefs.hex_gui_gtk3_theme_name[0] = '\0';
|
||||
setup_prefs.hex_gui_gtk3_theme_name[0] = '\0';
|
||||
save_config ();
|
||||
gtk_label_set_text (GTK_LABEL (ui->gtk3_status_label), _("Using system GTK theme."));
|
||||
setup_theme_show_message (GTK_MESSAGE_INFO, _("Using system GTK theme."));
|
||||
|
||||
Reference in New Issue
Block a user