From 1a69429ad9d8ae3f1310ccd7a92a1f09a38f20ff Mon Sep 17 00:00:00 2001 From: "giwoong.kim" Date: Thu, 22 Nov 2012 14:42:03 +0900 Subject: [PATCH] skin: remove the margin of shell set the display bounds before pack the shell Signed-off-by: GiWoong Kim --- .../org/tizen/emulator/skin/EmulatorSkin.java | 2 +- .../layout/GeneralPurposeSkinComposer.java | 2 +- .../skin/layout/PhoneShapeSkinComposer.java | 36 +++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java index dca0e1ee09..c9cba5cfc1 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java @@ -177,7 +177,7 @@ public class EmulatorSkin { this.isOnTop = isOnTop; this.pressedKeyEventList = new LinkedList(); - 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; } diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java index c649c094fb..ff7cbf7815 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java @@ -211,8 +211,8 @@ public class GeneralPurposeSkinComposer implements ISkinComposer { decoration.setLayoutData(dataDecoration); } - shell.redraw(); shell.pack(); + shell.redraw(); } @Override diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java index e6250f3ddb..948e92bc74 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java @@ -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 -- 2.34.1