[gnome-2048] Resize also tiles to be shown



commit 2c36cb58f301dba34ee913dc1862fc84831465d4
Author: Juan R. GarcĂ­a Blanco <juanrgar gmail com>
Date:   Fri Feb 20 23:58:50 2015 +0100

    Resize also tiles to be shown
    
    This fixes a problem when restoring the game to a maximized window. View
    allocation changes while showing the tiles; at that point tiles are in
    the nxt structure, and they were not resized properly.

 src/game.vala |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index 39f38f9..e1a938f 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -257,9 +257,11 @@ public class Game : GLib.Object
 
         _background[i,j].resize (x, y, tile_width, tile_height);
 
-        if (_foreground_cur[i,j] != null) {
+        if (_foreground_cur[i,j] != null)
           _foreground_cur[i,j].resize (x, y, tile_width, tile_height);
-        }
+
+        if (_foreground_nxt[i,j] != null)
+          _foreground_nxt[i,j].resize (x, y, tile_width, tile_height);
       }
     }
 


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