skin: call setSize after pack the shell
authorgiwoong.kim <giwoong.kim@samsung.com>
Mon, 4 Feb 2013 04:55:55 +0000 (13:55 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Mon, 4 Feb 2013 04:57:16 +0000 (13:57 +0900)
call setSize after pack the shell

Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java
tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java

index a8ae267e55cb0d27a65f505977100a93bc9aa3c7..2fbb281cd1e104b9465ac165da3ce2bfbf72cce5 100644 (file)
@@ -269,9 +269,6 @@ public class GeneralPurposeSkinComposer implements ISkinComposer {
                                        displayBounds.y + displayBounds.height + 1, displayBounds.width, 2);
                }
 
-               /* custom window shape */
-               trimPatchedShell(shell, currentState.getCurrentImage());
-
                /* arrange the pair tag */
                skin.pairTagCanvas.setBounds(
                                PAIR_TAG_POSITION_X, PAIR_TAG_POSITION_Y,
@@ -281,10 +278,18 @@ public class GeneralPurposeSkinComposer implements ISkinComposer {
                if (currentState.getCurrentImage() != null) {
                        ImageData imageData = currentState.getCurrentImage().getImageData();
                        shell.setMinimumSize(imageData.width, imageData.height);
-                       shell.setSize(imageData.width, imageData.height);
                }
 
                shell.pack();
+
+               if (currentState.getCurrentImage() != null) {
+                       ImageData imageData = currentState.getCurrentImage().getImageData();
+                       shell.setSize(imageData.width, imageData.height);
+               }
+
+               /* custom window shape */
+               trimPatchedShell(shell, currentState.getCurrentImage());
+
                shell.redraw();
        }
 
index 64d3e966a77cce014a7ab845afe00169f0d343fc..7fd6b9ec336ea48539870bf38ef5ebb1cdbbc039 100644 (file)
@@ -215,17 +215,23 @@ public class PhoneShapeSkinComposer implements ISkinComposer {
                                        lcdBounds.y + lcdBounds.height + 1, lcdBounds.width, 2);
                }
 
-               /* custom window shape */
-               SkinUtil.trimShell(shell, currentState.getCurrentImage());
-
                /* set window size */
                if (currentState.getCurrentImage() != null) {
                        ImageData imageData = currentState.getCurrentImage().getImageData();
                        shell.setMinimumSize(imageData.width, imageData.height);
-                       shell.setSize(imageData.width, imageData.height);
                }
 
                shell.pack();
+
+               /* set window size */
+               if (currentState.getCurrentImage() != null) {
+                       ImageData imageData = currentState.getCurrentImage().getImageData();
+                       shell.setSize(imageData.width, imageData.height);
+               }
+
+               /* custom window shape */
+               SkinUtil.trimShell(shell, currentState.getCurrentImage());
+
                shell.redraw();
        }