forked from AuroraMiddleware/gtk
a11y: Update the "pressed" state on toggle buttons
This commit is contained in:
parent
58628f9a9e
commit
2c75ba5509
@ -26,7 +26,9 @@
|
|||||||
|
|
||||||
#include "gtktogglebutton.h"
|
#include "gtktogglebutton.h"
|
||||||
|
|
||||||
|
#include "gtkaccessible.h"
|
||||||
#include "gtkbuttonprivate.h"
|
#include "gtkbuttonprivate.h"
|
||||||
|
#include "gtkenums.h"
|
||||||
#include "gtkintl.h"
|
#include "gtkintl.h"
|
||||||
#include "gtklabel.h"
|
#include "gtklabel.h"
|
||||||
#include "gtkmain.h"
|
#include "gtkmain.h"
|
||||||
@ -311,6 +313,10 @@ gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
|
|||||||
else
|
else
|
||||||
gtk_widget_unset_state_flags (GTK_WIDGET (toggle_button), GTK_STATE_FLAG_CHECKED);
|
gtk_widget_unset_state_flags (GTK_WIDGET (toggle_button), GTK_STATE_FLAG_CHECKED);
|
||||||
|
|
||||||
|
gtk_accessible_update_state (GTK_ACCESSIBLE (toggle_button),
|
||||||
|
GTK_ACCESSIBLE_STATE_PRESSED, is_active,
|
||||||
|
-1);
|
||||||
|
|
||||||
gtk_toggle_button_toggled (toggle_button);
|
gtk_toggle_button_toggled (toggle_button);
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (toggle_button), toggle_button_props[PROP_ACTIVE]);
|
g_object_notify_by_pspec (G_OBJECT (toggle_button), toggle_button_props[PROP_ACTIVE]);
|
||||||
|
Loading…
Reference in New Issue
Block a user