mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
Allow selectable labels contents to be selected by mnemonic
expecially by the mnemonic of another label that targets it. https://gitlab.gnome.org/GNOME/gtk/-/issues/4927 see also https://bugs.documentfoundation.org/show_bug.cgi?id=137748
This commit is contained in:
parent
26b250503d
commit
3f49d335d1
@ -2020,6 +2020,12 @@ gtk_label_mnemonic_activate (GtkWidget *widget,
|
||||
if (self->mnemonic_widget)
|
||||
return gtk_widget_mnemonic_activate (self->mnemonic_widget, group_cycling);
|
||||
|
||||
/* Not a label for something else, but is selectable, so set focus into
|
||||
* the label itself.
|
||||
*/
|
||||
if (gtk_label_get_selectable (self) && gtk_widget_get_focusable (widget))
|
||||
return gtk_label_grab_focus (widget);
|
||||
|
||||
/* Try to find the widget to activate by traversing the
|
||||
* widget's ancestry.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user