[iagno] Set grid's stroke width to 2px



commit 53eb6cd41b651f9906f36ef94ca47c389b35885b
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Tue Sep 16 01:34:08 2014 +0300

    Set grid's stroke width to 2px
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710125

 src/game-view.vala |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/game-view.vala b/src/game-view.vala
index 17b65bd..45411f9 100644
--- a/src/game-view.vala
+++ b/src/game-view.vala
@@ -12,7 +12,7 @@
 public class GameView : Gtk.DrawingArea
 {
     /* Space between tiles in pixels */
-    private const int GRID_WIDTH = 1;
+    private const int GRID_WIDTH = 2;
 
     /* Delay in milliseconds between tile flip frames */
     private const int PIXMAP_FLIP_DELAY = 20;
@@ -151,14 +151,14 @@ public class GameView : Gtk.DrawingArea
         cr.set_line_width (GRID_WIDTH);
         for (var i = 1; i < 8; i++)
         {
-            cr.move_to (x_offset + i * board_size / 8 - 0.5, y_offset);
+            cr.move_to (x_offset + i * board_size / 8 - GRID_WIDTH / 2, y_offset);
             cr.rel_line_to (0, board_size);
 
-            cr.move_to (x_offset, y_offset + i * board_size / 8 - 0.5);
+            cr.move_to (x_offset, y_offset + i * board_size / 8 - GRID_WIDTH / 2);
             cr.rel_line_to (board_size, 0);
         }
 
-        cr.rectangle (x_offset + 0.5, y_offset + 0.5, board_size - 1, board_size - 1);
+        cr.rectangle (x_offset - GRID_WIDTH / 2, y_offset - GRID_WIDTH / 2, board_size, board_size);
 
         cr.stroke ();
 


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