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 dca0e1e..c9cba5c 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 c649c09..ff7cbf7 100644 (file)
@@ -211,8 +211,8 @@ public class GeneralPurposeSkinComposer implements ISkinComposer {
                        decoration.setLayoutData(dataDecoration);
                }
 
-               shell.redraw();
                shell.pack();
+               shell.redraw();
        }
 
        @Override
index e6250f3..948e92b 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