range: Hide internals from accessibility

The nameless, faceless gizmos inside a range do not
contribute to the accessible experience at all, lets
not add them to the tree. All the accessible functionality
is on the main widget (either a scale or a scrollbar).
This commit is contained in:
Matthias Clasen 2020-10-21 08:00:09 -04:00
parent b7fa00e22d
commit 39dfdac771

View File

@ -529,12 +529,13 @@ gtk_range_init (GtkRange *range)
gtk_widget_update_orientation (GTK_WIDGET (range), priv->orientation); gtk_widget_update_orientation (GTK_WIDGET (range), priv->orientation);
priv->trough_widget = gtk_gizmo_new ("trough", priv->trough_widget = gtk_gizmo_new_with_role ("trough",
gtk_range_measure_trough, GTK_ACCESSIBLE_ROLE_NONE,
gtk_range_allocate_trough, gtk_range_measure_trough,
gtk_range_render_trough, gtk_range_allocate_trough,
NULL, gtk_range_render_trough,
NULL, NULL); NULL,
NULL, NULL);
gtk_widget_set_parent (priv->trough_widget, GTK_WIDGET (range)); gtk_widget_set_parent (priv->trough_widget, GTK_WIDGET (range));