mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 15:14:17 +00:00
stackswitcher: Use the tablist and tab roles
Set the tablist role on the stackswitcher itself, and the tab role on the buttons. This is another step towards implementing the tabs pattern for GtkStack.
This commit is contained in:
parent
2370429752
commit
380488f829
@ -248,7 +248,9 @@ add_child (guint position,
|
||||
GtkStackPage *page;
|
||||
GtkEventController *controller;
|
||||
|
||||
button = gtk_toggle_button_new ();
|
||||
button = g_object_new (GTK_TYPE_TOGGLE_BUTTON,
|
||||
"accessible-role", GTK_ACCESSIBLE_ROLE_TAB,
|
||||
NULL);
|
||||
gtk_widget_set_focus_on_click (button, FALSE);
|
||||
|
||||
controller = gtk_drop_controller_motion_new ();
|
||||
@ -498,6 +500,7 @@ gtk_stack_switcher_class_init (GtkStackSwitcherClass *class)
|
||||
|
||||
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);
|
||||
gtk_widget_class_set_css_name (widget_class, I_("stackswitcher"));
|
||||
gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_TAB_LIST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user