[gnome-games] display-box: Account for RTL when updating margins



commit d648eb8bcdd62d7b562f641b2317069f7d7fec65
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sun Aug 11 04:48:36 2019 +0500

    display-box: Account for RTL when updating margins
    
    Use margin-end instead of margin-right and always set margin-start to 0
    to prevent leftover margins after changing direction with savestate
    manager open.

 src/ui/display-box.vala | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/ui/display-box.vala b/src/ui/display-box.vala
index 0329e973..cac9364c 100644
--- a/src/ui/display-box.vala
+++ b/src/ui/display-box.vala
@@ -148,9 +148,10 @@ private class Games.DisplayBox : Gtk.Bin {
 
        private void update_margin () {
                var width = get_allocated_width ();
+               display_bin.margin_start = 0;
                if (width > 900)
-                       display_bin.margin_right = savestates_list.get_allocated_width ();
+                       display_bin.margin_end = savestates_list.get_allocated_width ();
                else
-                       display_bin.margin_right = 0;
+                       display_bin.margin_end = 0;
        }
 }


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