skin: remove the margin of shell
authorgiwoong.kim <giwoong.kim@samsung.com>
Thu, 22 Nov 2012 05:42:03 +0000 (14:42 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Thu, 22 Nov 2012 05:42:03 +0000 (14:42 +0900)
set the display bounds before pack the shell

Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java
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 dca0e1ee0983c96eb325b52f9c1391595bc9fa60..c9cba5cfc1785a8a30b3c2adaa735375e089935b 100644 (file)
@@ -177,7 +177,7 @@ public class EmulatorSkin {
                this.isOnTop = isOnTop;
                this.pressedKeyEventList = new LinkedList<KeyEventData>();
 
-               int style = SWT.NO_TRIM;
+               int style = SWT.NO_TRIM | SWT.DOUBLE_BUFFERED;
                if (skinInfo.isPhoneShape() == false) {
                        style = SWT.TITLE | SWT.CLOSE | SWT.MIN | SWT.BORDER;
                }
index c649c094fbb0c9c9fd870ef3a42dd0e8b42040cc..ff7cbf78153f5a26936e11e375413dd4e921a863 100644 (file)
@@ -211,8 +211,8 @@ public class GeneralPurposeSkinComposer implements ISkinComposer {
                        decoration.setLayoutData(dataDecoration);
                }
 
-               shell.redraw();
                shell.pack();
+               shell.redraw();
        }
 
        @Override
index e6250f3ddba16835a177668a06ab352c9f8f3971..948e92bc74d7c37a4c7d36570b24bcb9c2d0e2b7 100644 (file)
@@ -156,6 +156,23 @@ public class PhoneShapeSkinComposer implements ISkinComposer {
                currentState.setCurrentRotationId(rotationId);
                currentState.setCurrentAngle(SkinRotation.getAngle(rotationId));
 
+               /* arrange the lcd */
+               Rectangle lcdBounds = adjustLcdGeometry(lcdCanvas,
+                               currentState.getCurrentResolutionWidth(),
+                               currentState.getCurrentResolutionHeight(), scale, rotationId);
+
+               if (lcdBounds == null) {
+                       logger.severe("Failed to lcd information for phone shape skin.");
+                       SkinUtil.openMessage(shell, null,
+                                       "Failed to read lcd information for phone shape skin.\n" +
+                                       "Check the contents of skin dbi file.",
+                                       SWT.ICON_ERROR, config);
+                       System.exit(-1);
+               }
+               logger.info("lcd bounds : " + lcdBounds);
+
+               lcdCanvas.setBounds(lcdBounds);
+
                /* arrange the skin image */
                Image tempImage = null;
                Image tempKeyPressedImage = null;
@@ -189,25 +206,8 @@ public class PhoneShapeSkinComposer implements ISkinComposer {
                        shell.setSize(imageData.width, imageData.height);
                }
 
-               shell.redraw();
                shell.pack();
-
-               /* arrange the lcd */
-               Rectangle lcdBounds = adjustLcdGeometry(lcdCanvas,
-                               currentState.getCurrentResolutionWidth(),
-                               currentState.getCurrentResolutionHeight(), scale, rotationId);
-
-               if (lcdBounds == null) {
-                       logger.severe("Failed to lcd information for phone shape skin.");
-                       SkinUtil.openMessage(shell, null,
-                                       "Failed to read lcd information for phone shape skin.\n" +
-                                       "Check the contents of skin dbi file.",
-                                       SWT.ICON_ERROR, config);
-                       System.exit(-1);
-               }
-               logger.info("lcd bounds : " + lcdBounds);
-
-               lcdCanvas.setBounds(lcdBounds);
+               shell.redraw();
        }
 
        @Override