From: giwoong.kim Date: Fri, 30 Nov 2012 05:13:06 +0000 (+0900) Subject: skin: modified nine-patch image resource X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1313^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7462bf995fb38ebaa0a2b0a00de3c6d609b3a18;p=sdk%2Femulator%2Fqemu.git skin: modified nine-patch image resource Changed image color & reomved shadow affect And trim a key window. Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/skin/client/resource/images/emul-window/B.png b/tizen/src/skin/client/resource/images/emul-window/B.png old mode 100755 new mode 100644 index 0368b89c69..7c6de93902 Binary files a/tizen/src/skin/client/resource/images/emul-window/B.png and b/tizen/src/skin/client/resource/images/emul-window/B.png differ diff --git a/tizen/src/skin/client/resource/images/emul-window/L.png b/tizen/src/skin/client/resource/images/emul-window/L.png old mode 100755 new mode 100644 index 4998858c37..9c8f00e6e0 Binary files a/tizen/src/skin/client/resource/images/emul-window/L.png and b/tizen/src/skin/client/resource/images/emul-window/L.png differ diff --git a/tizen/src/skin/client/resource/images/emul-window/LB.png b/tizen/src/skin/client/resource/images/emul-window/LB.png old mode 100755 new mode 100644 index 68c2cba78d..e89fe588ef Binary files a/tizen/src/skin/client/resource/images/emul-window/LB.png and b/tizen/src/skin/client/resource/images/emul-window/LB.png differ diff --git a/tizen/src/skin/client/resource/images/emul-window/LT.png b/tizen/src/skin/client/resource/images/emul-window/LT.png old mode 100755 new mode 100644 index 3026861194..df8ce2d294 Binary files a/tizen/src/skin/client/resource/images/emul-window/LT.png and b/tizen/src/skin/client/resource/images/emul-window/LT.png differ diff --git a/tizen/src/skin/client/resource/images/emul-window/R.png b/tizen/src/skin/client/resource/images/emul-window/R.png old mode 100755 new mode 100644 index 1732cae32d..9bc9bfe4bd Binary files a/tizen/src/skin/client/resource/images/emul-window/R.png and b/tizen/src/skin/client/resource/images/emul-window/R.png differ diff --git a/tizen/src/skin/client/resource/images/emul-window/RB.png b/tizen/src/skin/client/resource/images/emul-window/RB.png old mode 100755 new mode 100644 index 2a6ad81edf..102d91a6d0 Binary files a/tizen/src/skin/client/resource/images/emul-window/RB.png and b/tizen/src/skin/client/resource/images/emul-window/RB.png differ diff --git a/tizen/src/skin/client/resource/images/emul-window/RT.png b/tizen/src/skin/client/resource/images/emul-window/RT.png old mode 100755 new mode 100644 index 659c66d019..8b2d70587c Binary files a/tizen/src/skin/client/resource/images/emul-window/RT.png and b/tizen/src/skin/client/resource/images/emul-window/RT.png differ diff --git a/tizen/src/skin/client/resource/images/emul-window/T.png b/tizen/src/skin/client/resource/images/emul-window/T.png old mode 100755 new mode 100644 index f8345ec104..8fcbae0d84 Binary files a/tizen/src/skin/client/resource/images/emul-window/T.png and b/tizen/src/skin/client/resource/images/emul-window/T.png differ diff --git a/tizen/src/skin/client/resource/images/emul-window/arrow_hover.png b/tizen/src/skin/client/resource/images/emul-window/arrow_hover.png old mode 100755 new mode 100644 diff --git a/tizen/src/skin/client/resource/images/emul-window/arrow_nml.png b/tizen/src/skin/client/resource/images/emul-window/arrow_nml.png old mode 100755 new mode 100644 diff --git a/tizen/src/skin/client/resource/images/emul-window/arrow_pushed.png b/tizen/src/skin/client/resource/images/emul-window/arrow_pushed.png old mode 100755 new mode 100644 diff --git a/tizen/src/skin/client/resource/images/key-window/B.png b/tizen/src/skin/client/resource/images/key-window/B.png old mode 100755 new mode 100644 index 6447fdbf3c..9e228a5577 Binary files a/tizen/src/skin/client/resource/images/key-window/B.png and b/tizen/src/skin/client/resource/images/key-window/B.png differ diff --git a/tizen/src/skin/client/resource/images/key-window/L.png b/tizen/src/skin/client/resource/images/key-window/L.png old mode 100755 new mode 100644 index a6b2b9f1bc..81794287a1 Binary files a/tizen/src/skin/client/resource/images/key-window/L.png and b/tizen/src/skin/client/resource/images/key-window/L.png differ diff --git a/tizen/src/skin/client/resource/images/key-window/LB.png b/tizen/src/skin/client/resource/images/key-window/LB.png old mode 100755 new mode 100644 index a26f102805..c309f22c2f Binary files a/tizen/src/skin/client/resource/images/key-window/LB.png and b/tizen/src/skin/client/resource/images/key-window/LB.png differ diff --git a/tizen/src/skin/client/resource/images/key-window/LT.png b/tizen/src/skin/client/resource/images/key-window/LT.png old mode 100755 new mode 100644 index 6410e57c25..f101318b00 Binary files a/tizen/src/skin/client/resource/images/key-window/LT.png and b/tizen/src/skin/client/resource/images/key-window/LT.png differ diff --git a/tizen/src/skin/client/resource/images/key-window/R.png b/tizen/src/skin/client/resource/images/key-window/R.png old mode 100755 new mode 100644 index 55cb3e0f5f..def2d948e7 Binary files a/tizen/src/skin/client/resource/images/key-window/R.png and b/tizen/src/skin/client/resource/images/key-window/R.png differ diff --git a/tizen/src/skin/client/resource/images/key-window/RB.png b/tizen/src/skin/client/resource/images/key-window/RB.png old mode 100755 new mode 100644 index 8c6927c4e9..e027841805 Binary files a/tizen/src/skin/client/resource/images/key-window/RB.png and b/tizen/src/skin/client/resource/images/key-window/RB.png differ diff --git a/tizen/src/skin/client/resource/images/key-window/RT.png b/tizen/src/skin/client/resource/images/key-window/RT.png old mode 100755 new mode 100644 index e88516b271..95a1dba24a Binary files a/tizen/src/skin/client/resource/images/key-window/RT.png and b/tizen/src/skin/client/resource/images/key-window/RT.png differ diff --git a/tizen/src/skin/client/resource/images/key-window/T.png b/tizen/src/skin/client/resource/images/key-window/T.png old mode 100755 new mode 100644 index 6a393f1b97..9fc05ac8b6 Binary files a/tizen/src/skin/client/resource/images/key-window/T.png and b/tizen/src/skin/client/resource/images/key-window/T.png differ diff --git a/tizen/src/skin/client/resource/images/key-window/keybutton_hover.png b/tizen/src/skin/client/resource/images/key-window/keybutton_hover.png old mode 100755 new mode 100644 diff --git a/tizen/src/skin/client/resource/images/key-window/keybutton_nml.png b/tizen/src/skin/client/resource/images/key-window/keybutton_nml.png old mode 100755 new mode 100644 diff --git a/tizen/src/skin/client/resource/images/key-window/keybutton_pushed.png b/tizen/src/skin/client/resource/images/key-window/keybutton_pushed.png old mode 100755 new mode 100644 diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/window/ControlPanel.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/window/ControlPanel.java index 8c79fd65e3..d36df3e3e4 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/window/ControlPanel.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/window/ControlPanel.java @@ -39,8 +39,11 @@ import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.graphics.Region; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; @@ -104,6 +107,7 @@ public class ControlPanel extends SkinWindow { this.grabPosition = new Point(0, 0); createContents(); + trimPatchedShell(shell, imageFrame); addControlPanelListener(); shell.setBackground(colorFrame); @@ -173,6 +177,30 @@ public class ControlPanel extends SkinWindow { compositeScroll.setMinSize(compositeBase.computeSize(SWT.DEFAULT, SWT.DEFAULT)); } + public static void trimPatchedShell(Shell shell, Image image) { + if (null == image) { + return; + } + ImageData imageData = image.getImageData(); + + int width = imageData.width; + int height = imageData.height; + + Region region = new Region(); + region.add(new Rectangle(0, 0, width, height)); + + for (int i = 0; i < width; i++) { + for (int j = 0; j < height; j++) { + int colorPixel = imageData.getPixel(i, j); + if (colorPixel == 0xFF00FF /* magenta */) { + region.subtract(i, j, 1, 1); + } + } + } + + shell.setRegion(region); + } + private void addControlPanelListener() { shellPaintListener = new PaintListener() { @Override