mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 14:50:06 +00:00
GtkHSV: set a suitable role for the accessible
The consensus of the accessibility team was that 'color chooser' fits best for this. Update tests to match.
This commit is contained in:
parent
3edebfb81c
commit
1b8c38f6e1
15
gtk/gtkhsv.c
15
gtk/gtkhsv.c
@ -124,6 +124,7 @@ static gboolean gtk_hsv_focus (GtkWidget *widget,
|
|||||||
GtkDirectionType direction);
|
GtkDirectionType direction);
|
||||||
static void gtk_hsv_move (GtkHSV *hsv,
|
static void gtk_hsv_move (GtkHSV *hsv,
|
||||||
GtkDirectionType dir);
|
GtkDirectionType dir);
|
||||||
|
static AtkObject *gtk_hsv_get_accessible (GtkWidget *widget);
|
||||||
|
|
||||||
static guint hsv_signals[LAST_SIGNAL];
|
static guint hsv_signals[LAST_SIGNAL];
|
||||||
|
|
||||||
@ -154,6 +155,7 @@ gtk_hsv_class_init (GtkHSVClass *class)
|
|||||||
widget_class->draw = gtk_hsv_draw;
|
widget_class->draw = gtk_hsv_draw;
|
||||||
widget_class->focus = gtk_hsv_focus;
|
widget_class->focus = gtk_hsv_focus;
|
||||||
widget_class->grab_broken_event = gtk_hsv_grab_broken;
|
widget_class->grab_broken_event = gtk_hsv_grab_broken;
|
||||||
|
widget_class->get_accessible = gtk_hsv_get_accessible;
|
||||||
|
|
||||||
hsv_class->move = gtk_hsv_move;
|
hsv_class->move = gtk_hsv_move;
|
||||||
|
|
||||||
@ -1618,3 +1620,16 @@ gtk_hsv_move (GtkHSV *hsv,
|
|||||||
|
|
||||||
gtk_hsv_set_color (hsv, hue, sat, val);
|
gtk_hsv_set_color (hsv, hue, sat, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static AtkObject *
|
||||||
|
gtk_hsv_get_accessible (GtkWidget *widget)
|
||||||
|
{
|
||||||
|
AtkObject *obj;
|
||||||
|
|
||||||
|
obj = GTK_WIDGET_CLASS (gtk_hsv_parent_class)->get_accessible (widget);
|
||||||
|
|
||||||
|
atk_object_set_role (obj, ATK_ROLE_COLOR_CHOOSER);
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ window1
|
|||||||
layer: widget
|
layer: widget
|
||||||
alpha: 1
|
alpha: 1
|
||||||
unnamed-GailWidget-4
|
unnamed-GailWidget-4
|
||||||
"unknown"
|
"color chooser"
|
||||||
parent: unnamed-GailBox-3
|
parent: unnamed-GailBox-3
|
||||||
index: 0
|
index: 0
|
||||||
name: Color Wheel
|
name: Color Wheel
|
||||||
|
Loading…
Reference in New Issue
Block a user