diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-10-17 17:18:09 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-10-17 17:18:09 +0100 |
commit | 411cd7c7275bdb5442b3e912d8df5c636b37a7a4 (patch) | |
tree | 650fa6fd3e533696f4127cd2906a01c8e96962c4 | |
parent | c5d39c3582e504870caeb46399075235793ae1f7 (diff) | |
download | gtk+-issue-1505.tar.gz |
a11y: Apply widget scaling factorissue-1505
Use the "real" widget bounds for the AtkComponent rectangle.
Fixes: #1505
-rw-r--r-- | gtk/a11y/gtkwidgetaccessible.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/a11y/gtkwidgetaccessible.c b/gtk/a11y/gtkwidgetaccessible.c index d1cf7da80f..07c99d3db5 100644 --- a/gtk/a11y/gtkwidgetaccessible.c +++ b/gtk/a11y/gtkwidgetaccessible.c @@ -82,10 +82,12 @@ size_allocate_cb (GtkWidget *widget, accessible = gtk_widget_get_accessible (widget); if (ATK_IS_COMPONENT (accessible)) { - rect.x = allocation->x; - rect.y = allocation->y; - rect.width = allocation->width; - rect.height = allocation->height; + int scale = gtk_widget_get_scale_factor (widget); + + rect.x = allocation->x * scale; + rect.y = allocation->y * scale; + rect.width = allocation->width * scale; + rect.height = allocation->height * scale; g_signal_emit_by_name (accessible, "bounds-changed", &rect); } } |