forked from AuroraMiddleware/gtk
a11y: Set up controls relations for scrollbars
GtkScrolledWindow knows what its scrollbars control, so set up the accessible relations for this.
This commit is contained in:
parent
efd4169fa2
commit
971ee2d28a
@ -4139,6 +4139,7 @@ gtk_scrolled_window_set_child (GtkScrolledWindow *scrolled_window,
|
||||
{
|
||||
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
|
||||
GtkWidget *scrollable_child;
|
||||
GList *list;
|
||||
|
||||
g_return_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window));
|
||||
|
||||
@ -4194,6 +4195,15 @@ gtk_scrolled_window_set_child (GtkScrolledWindow *scrolled_window,
|
||||
NULL);
|
||||
}
|
||||
|
||||
list = g_list_append (NULL, priv->child);
|
||||
gtk_accessible_update_relation (GTK_ACCESSIBLE (priv->hscrollbar),
|
||||
GTK_ACCESSIBLE_RELATION_CONTROLS, list,
|
||||
-1);
|
||||
gtk_accessible_update_relation (GTK_ACCESSIBLE (priv->vscrollbar),
|
||||
GTK_ACCESSIBLE_RELATION_CONTROLS, list,
|
||||
-1);
|
||||
g_list_free (list);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (scrolled_window), properties[PROP_CHILD]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user