skin: modified nine-patch image resource
authorgiwoong.kim <giwoong.kim@samsung.com>
Fri, 30 Nov 2012 05:13:06 +0000 (14:13 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Fri, 30 Nov 2012 05:13:06 +0000 (14:13 +0900)
Changed image color & reomved shadow affect
And trim a key window.

Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
23 files changed:
tizen/src/skin/client/resource/images/emul-window/B.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/emul-window/L.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/emul-window/LB.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/emul-window/LT.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/emul-window/R.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/emul-window/RB.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/emul-window/RT.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/emul-window/T.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/emul-window/arrow_hover.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/emul-window/arrow_nml.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/emul-window/arrow_pushed.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/key-window/B.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/key-window/L.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/key-window/LB.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/key-window/LT.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/key-window/R.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/key-window/RB.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/key-window/RT.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/key-window/T.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/key-window/keybutton_hover.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/key-window/keybutton_nml.png [changed mode: 0755->0644]
tizen/src/skin/client/resource/images/key-window/keybutton_pushed.png [changed mode: 0755->0644]
tizen/src/skin/client/src/org/tizen/emulator/skin/window/ControlPanel.java

old mode 100755 (executable)
new mode 100644 (file)
index 0368b89..7c6de93
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
old mode 100755 (executable)
new mode 100644 (file)
index 4998858..9c8f00e
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
old mode 100755 (executable)
new mode 100644 (file)
index 68c2cba..e89fe58
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
old mode 100755 (executable)
new mode 100644 (file)
index 3026861..df8ce2d
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
old mode 100755 (executable)
new mode 100644 (file)
index 1732cae..9bc9bfe
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
old mode 100755 (executable)
new mode 100644 (file)
index 2a6ad81..102d91a
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
old mode 100755 (executable)
new mode 100644 (file)
index 659c66d..8b2d705
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
old mode 100755 (executable)
new mode 100644 (file)
index f8345ec..8fcbae0
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
old mode 100755 (executable)
new mode 100644 (file)
index 6447fdb..9e228a5
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
old mode 100755 (executable)
new mode 100644 (file)
index a6b2b9f..8179428
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
old mode 100755 (executable)
new mode 100644 (file)
index a26f102..c309f22
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
old mode 100755 (executable)
new mode 100644 (file)
index 6410e57..f101318
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
old mode 100755 (executable)
new mode 100644 (file)
index 55cb3e0..def2d94
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
old mode 100755 (executable)
new mode 100644 (file)
index 8c6927c..e027841
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
old mode 100755 (executable)
new mode 100644 (file)
index e88516b..95a1dba
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
old mode 100755 (executable)
new mode 100644 (file)
index 6a393f1..9fc05ac
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
index 8c79fd6..d36df3e 100644 (file)
@@ -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