[gnome-sudoku] Handle RTL correctly.



commit cd1132ce7c378a2763e84a2b890146d9070b3f4b
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Aug 21 02:21:13 2014 +0200

    Handle RTL correctly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735020

 src/sudoku-view.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index c83ab82..4f86f88 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -464,6 +464,12 @@ public class SudokuView : Gtk.AspectFrame
         /* not exactly the tile side: includes the width of a border line (1) */
         double tile_side = ((double) (board_side - 1)) / game.board.cols;
 
+        if (Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL)
+        {
+            c.translate (board_side, 0);
+            c.scale (-1, 1);
+        }
+
         for (var i = 0; i < game.board.cols; i++)
         {
             for (var j = 0; j < game.board.cols; j++)


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