dialogs: Fix buttons missing their style class

Per @brunolopesdsilv, the About and Quit
dialogues had custom buttons which did
not receive the text-button CSS style.
This patch adds those back so the buttons
match the styling of the others in the
dialogue.
This commit is contained in:
Alx Sa 2024-03-02 03:55:08 +00:00
parent 823ab560c6
commit a16219bf4b
2 changed files with 7 additions and 3 deletions

View File

@ -420,6 +420,8 @@ about_dialog_add_update (GimpAboutDialog *dialog,
"view-refresh",
GTK_ICON_SIZE_MENU);
gtk_label_set_text (GTK_LABEL (button_label), _("Check for updates"));
gtk_style_context_add_class (gtk_widget_get_style_context (button),
"text-button");
g_signal_connect_swapped (button, "clicked",
(GCallback) gimp_update_check, config);

View File

@ -183,9 +183,9 @@ quit_close_all_dialog_new (Gimp *gimp,
"", GTK_RESPONSE_OK);
gimp_dialog_set_alternative_button_order (GTK_DIALOG (private->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_object_weak_ref (G_OBJECT (private->dialog),
(GWeakNotify) quit_close_all_dialog_free, private);
@ -427,6 +427,8 @@ quit_close_all_dialog_container_changed (GimpContainer *images,
"use-stock", FALSE,
"image", icon,
NULL);
gtk_style_context_add_class (gtk_widget_get_style_context (private->ok_button),
"text-button");
gtk_dialog_set_default_response (GTK_DIALOG (private->dialog),
GTK_RESPONSE_CANCEL);