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
This commit is contained in:
Matthias Clasen 2021-01-15 14:56:21 -05:00
parent 141c725489
commit d89ff71819

View File

@ -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;