[gnome-software] hiding box: Fix incorrect allocation of the children in RTL



commit 7e4acc906ff834a03a973708589b3207906ed3f2
Author: Rafal Luzynski <digitalfreak lingonborough com>
Date:   Fri Aug 28 00:07:52 2015 +0200

    hiding box: Fix incorrect allocation of the children in RTL
    
    Trivial fix but the bug made the contents stick to the left edge
    of the window without any margin in the RTL locales.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754207

 src/gs-hiding-box.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-hiding-box.c b/src/gs-hiding-box.c
index 7d153d9..0ce745f 100644
--- a/src/gs-hiding-box.c
+++ b/src/gs-hiding-box.c
@@ -264,8 +264,7 @@ gs_hiding_box_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
                        ++child_allocation.width; --n_extra_widgets;
                }
                if (direction == GTK_TEXT_DIR_RTL) {
-                       child_allocation.x = allocation->x + allocation->width
-                               - child_allocation.x - child_allocation.width;
+                       child_allocation.x = allocation->x + allocation->width - (child_allocation.x - 
allocation->x) - child_allocation.width;
                }
 
                /* Let this child be visible */


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