[gnome-text-editor: 1/2] window: add a11y labels to zoom buttons




commit 8a515e293290f7efcf7c31d297cdae579cac3047
Author: Lukáš Tyrychtr <lukastyrychtr gmail com>
Date:   Wed Jul 20 17:44:36 2022 +0000

    window: add a11y labels to zoom buttons

 src/editor-window.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/editor-window.c b/src/editor-window.c
index 68813ec..2933128 100644
--- a/src/editor-window.c
+++ b/src/editor-window.c
@@ -503,6 +503,9 @@ editor_window_constructed (GObject *object)
                           NULL);
   gtk_widget_add_css_class (zoom_in, "circular");
   gtk_widget_add_css_class (zoom_in, "flat");
+  gtk_accessible_update_property (GTK_ACCESSIBLE (zoom_in),
+                                  GTK_ACCESSIBLE_PROPERTY_LABEL,
+                                  _("Zoom in"), -1);
   zoom_out = g_object_new (GTK_TYPE_BUTTON,
                            "action-name", "page.zoom-out",
                           "child", g_object_new (GTK_TYPE_IMAGE,
@@ -512,6 +515,9 @@ editor_window_constructed (GObject *object)
                            NULL);
   gtk_widget_add_css_class (zoom_out, "circular");
   gtk_widget_add_css_class (zoom_out, "flat");
+  gtk_accessible_update_property (GTK_ACCESSIBLE (zoom_out),
+                                  GTK_ACCESSIBLE_PROPERTY_LABEL,
+                                  _("Zoom out"), -1);
   self->zoom_label = g_object_new (GTK_TYPE_LABEL,
                                    "hexpand", TRUE,
                                    "label", "100%",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]