mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
togglebutton: Set a11y properties on realize
The pressed property is required, so we need to make sure that it is set.
This commit is contained in:
parent
9e784f47c9
commit
bc27b54367
@ -260,6 +260,19 @@ get_group_first (GtkToggleButton *self)
|
||||
return group_first;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_toggle_button_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkToggleButton *self = GTK_TOGGLE_BUTTON (widget);
|
||||
GtkToggleButtonPrivate *priv = gtk_toggle_button_get_instance_private (self);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_toggle_button_parent_class)->realize (widget);
|
||||
|
||||
gtk_accessible_update_state (GTK_ACCESSIBLE (widget),
|
||||
GTK_ACCESSIBLE_STATE_PRESSED, priv->active,
|
||||
-1);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_toggle_button_class_init (GtkToggleButtonClass *class)
|
||||
{
|
||||
@ -272,6 +285,7 @@ gtk_toggle_button_class_init (GtkToggleButtonClass *class)
|
||||
gobject_class->get_property = gtk_toggle_button_get_property;
|
||||
|
||||
widget_class->mnemonic_activate = gtk_toggle_button_mnemonic_activate;
|
||||
widget_class->realize = gtk_toggle_button_realize;
|
||||
|
||||
button_class->clicked = gtk_toggle_button_clicked;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user