From 80c4d4f51deedefcedfeb0cc8794d8ad66d296fd Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 17 Jun 2023 11:37:22 -0400 Subject: [PATCH] colordialogbutton: Sync color Make sure the color of the swatch and the button are initially in sync. As a side-effect, this ensures that the swatch has its accessible label computed at the outset. --- gtk/gtkcolordialogbutton.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkcolordialogbutton.c b/gtk/gtkcolordialogbutton.c index 10f527febf..dce03690d1 100644 --- a/gtk/gtkcolordialogbutton.c +++ b/gtk/gtkcolordialogbutton.c @@ -141,6 +141,8 @@ gtk_color_dialog_button_init (GtkColorDialogButton *self) GTK_PHASE_CAPTURE); gtk_widget_add_controller (self->button, GTK_EVENT_CONTROLLER (source)); gtk_widget_add_css_class (self->button, "color"); + + gtk_color_dialog_button_set_rgba (self, &(GdkRGBA) { 0.75, 0.25, 0.25, 1.0 }); } static void -- 2.30.2