forked from AuroraMiddleware/gtk
colorbutton: Fix focus
The colorbutton contains a button which contains a colorswatch. We want the focus to go straight to the button, nowhere else, so mark the swatch as !can-focus. Adapt tests to match.
This commit is contained in:
parent
f2d6a7b36a
commit
8991275fbd
@ -265,6 +265,7 @@ gtk_color_button_init (GtkColorButton *button)
|
||||
gtk_widget_set_parent (priv->button, GTK_WIDGET (button));
|
||||
|
||||
priv->swatch = gtk_color_swatch_new ();
|
||||
gtk_widget_set_can_focus (priv->swatch, FALSE);
|
||||
layout = gtk_widget_create_pango_layout (GTK_WIDGET (button), "Black");
|
||||
pango_layout_get_pixel_extents (layout, NULL, &rect);
|
||||
g_object_unref (layout);
|
||||
|
@ -16,7 +16,6 @@ GtkToggleButton
|
||||
GtkToggleButton
|
||||
GtkButton
|
||||
GtkButton
|
||||
GtkColorSwatch
|
||||
GtkButton
|
||||
GtkLinkButton
|
||||
GtkSwitch
|
||||
|
Loading…
Reference in New Issue
Block a user