forked from AuroraMiddleware/gtk
modelbutton: Be focusable
This got lost when modelbuttons stopped being derived from buttons. It is necessary, since the GTK focus machinery takes this flag seriously nowadays, and won't let us grab focus to non-focusable widgets.
This commit is contained in:
parent
6b89d8a199
commit
28b91a4450
@ -1378,6 +1378,8 @@ gtk_model_button_init (GtkModelButton *self)
|
||||
GtkEventController *controller;
|
||||
GtkGesture *gesture;
|
||||
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE);
|
||||
|
||||
self->role = GTK_BUTTON_ROLE_NORMAL;
|
||||
self->label = gtk_label_new ("");
|
||||
gtk_widget_set_halign (self->label, GTK_ALIGN_START);
|
||||
|
Loading…
Reference in New Issue
Block a user