switch: Initialize accessible state

The checked state defaults to undefined, so we need
to set it to the desired false state.
This commit is contained in:
Matthias Clasen 2020-07-27 19:57:13 -04:00
parent 2cbaa568b5
commit 2ef4be21c8

View File

@ -659,6 +659,10 @@ gtk_switch_init (GtkSwitch *self)
self->slider = gtk_gizmo_new ("slider", NULL, NULL, NULL, NULL, NULL, NULL);
gtk_widget_set_parent (self->slider, GTK_WIDGET (self));
gtk_accessible_update_state (GTK_ACCESSIBLE (self),
GTK_ACCESSIBLE_STATE_CHECKED, FALSE,
-1);
}
/**