Added theming to menu_about() immediately after gtk_about_dialog_new() by calling fe_apply_theme_to_toplevel (GTK_WIDGET (dialog));, with the requested short CSS-selector comment style.

Added theming to setup_browsefont_cb() immediately after gtk_font_chooser_dialog_new(...) by calling fe_apply_theme_to_toplevel (dialog);, plus the same short comment for consistency/discoverability.
Added theming to setup_color_cb() immediately after gtk_color_chooser_dialog_new(...) by calling fe_apply_theme_to_toplevel (dialog);, again with the matching comment.
This commit is contained in:
2026-02-25 23:30:35 -07:00
parent 440e9ecf5a
commit 578a417804
2 changed files with 9 additions and 0 deletions

View File

@@ -1859,6 +1859,9 @@ static void
menu_about (GtkWidget *wid, gpointer sess)
{
GtkAboutDialog *dialog = GTK_ABOUT_DIALOG(gtk_about_dialog_new());
/* Window classes are required for GTK CSS selectors like
* .zoitechat-dark/.zoitechat-light. */
fe_apply_theme_to_toplevel (GTK_WIDGET (dialog));
char comment[512];
char *license = "This program is free software; you can redistribute it and/or modify\n" \
"it under the terms of the GNU General Public License as published by\n" \

View File

@@ -1242,6 +1242,9 @@ setup_browsefont_cb (GtkWidget *button, GtkWidget *entry)
const char *font_name;
dialog = gtk_font_chooser_dialog_new (_("Select font"), GTK_WINDOW (setup_window));
/* Window classes are required for GTK CSS selectors like
* .zoitechat-dark/.zoitechat-light. */
fe_apply_theme_to_toplevel (dialog);
font_dialog = dialog; /* global var */
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
@@ -1697,6 +1700,9 @@ setup_color_cb (GtkWidget *button, gpointer userdata)
color_index = GPOINTER_TO_INT (userdata);
dialog = gtk_color_chooser_dialog_new (_("Select color"), GTK_WINDOW (setup_window));
/* Window classes are required for GTK CSS selectors like
* .zoitechat-dark/.zoitechat-light. */
fe_apply_theme_to_toplevel (dialog);
if (setup_color_edit_source_colors && color_index >= 0 && color_index <= MAX_COL)
setup_rgba_from_palette (&setup_color_edit_source_colors[color_index], &rgba);
else