[gnome-2048] Fix width and height computation on resizing



commit adcbf258d30a03927c608e477fb70300d9637671
Author: Juan R. GarcĂ­a Blanco <juanrgar gmail com>
Date:   Fri Feb 13 23:52:19 2015 +0100

    Fix width and height computation on resizing

 src/game.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index 6c6f5e0..8643a0b 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -242,8 +242,8 @@ public class Game : GLib.Object
     canvas_width -= (cols + 1) * BLANK_COL_WIDTH;
     canvas_height -= (rows + 1) * BLANK_ROW_HEIGHT;
 
-    float tile_width = canvas_width / rows;
-    float tile_height = canvas_height / cols;
+    float tile_width = canvas_width / cols;
+    float tile_height = canvas_height / rows;
 
     for (int i = 0; i < rows; i++) {
       for (int j = 0; j < cols; j++) {


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