diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-01-15 14:56:21 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-01-15 14:58:21 -0500 |
commit | d89ff7181941d202d257337f8de4ee1da7cbcbea (patch) | |
tree | a728adfd711869a057b0d0bdaf0ee2a576c0fa70 | |
parent | 141c725489f153d7705de7f208c6acec81bc47af (diff) | |
download | gtk+-d89ff7181941d202d257337f8de4ee1da7cbcbea.tar.gz |
Flip margin-start and -end in RTL
We lost this at some point, but the widget margins
are still meant to be relative to the text direction.
Fixes: #3583
-rw-r--r-- | gtk/gtkwidget.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 6efcdccc4a..45a3720b18 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -3900,7 +3900,10 @@ gtk_widget_allocate (GtkWidget *widget, priv->allocated_height = height; priv->allocated_size_baseline = baseline; - adjusted.x = priv->margin.left; + if (_gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) + adjusted.x = priv->margin.left; + else + adjusted.x = priv->margin.right; adjusted.y = priv->margin.top; adjusted.width = width - priv->margin.left - priv->margin.right; adjusted.height = height - priv->margin.top - priv->margin.bottom; |