skin: modified general key window for wearable 90/23490/2
authorGiWoong Kim <giwoong.kim@samsung.com>
Thu, 26 Jun 2014 11:51:47 +0000 (20:51 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Mon, 30 Jun 2014 05:24:18 +0000 (14:24 +0900)
Change-Id: I075bccc2e7f9e2b1d8991ade6014870ca32ef65b
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/skin/client/skins/wearable-general-1btn/info.ini
tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java
tizen/src/skin/client/src/org/tizen/emulator/skin/layout/ProfileSpecificSkinComposer.java
tizen/src/skin/client/src/org/tizen/emulator/skin/menu/GeneralKeyWindow.java

index 5b2b2a9..96ef1c0 100644 (file)
@@ -1,4 +1,4 @@
 skin.name=General purpose wearable
-resolution.width=320
-resolution.height=320
+resolution.width=all
+resolution.height=all
 manager.priority=2
index 6b49aad..dc8f197 100644 (file)
@@ -441,7 +441,7 @@ public class GeneralPurposeSkinComposer implements ISkinComposer {
 
                                /* display should be redrawn When host OS wakes up from suspend
                                 on Ubuntu */
-                               if (SwtUtil.isLinuxPlatform() == true) {
+                               if (SwtUtil.isLinuxPlatform() == true && shell.getRegion() != null) {
                                        if (shell.getRegion().getBounds().x == e.x
                                                        && shell.getRegion().getBounds().y == e.y
                                                        && shell.getRegion().getBounds().width == e.width
index 19fa138..c44ac49 100644 (file)
@@ -371,7 +371,7 @@ public class ProfileSpecificSkinComposer implements ISkinComposer {
 
                                /* display should be redrawn When host OS wakes up from suspend
                                 on Ubuntu */
-                               if (SwtUtil.isLinuxPlatform() == true) {
+                               if (SwtUtil.isLinuxPlatform() == true && shell.getRegion() != null) {
                                        if (shell.getRegion().getBounds().x == e.x
                                                        && shell.getRegion().getBounds().y == e.y
                                                        && shell.getRegion().getBounds().width == e.width
index 2680b4a..5e1a549 100644 (file)
@@ -130,11 +130,11 @@ public class GeneralKeyWindow extends SkinWindow {
                                imageRegistry.getKeyWindowImage(
                                                GeneralKeyWindowImageName.KEYWINDOW_PATCH_RB));
 
-               this.keyMapList = keyMapList; //TODO: null
+               this.keyMapList = keyMapList;
                this.grabPosition = new Point(0, 0);
 
                shell.setText(parent.getText());
-               shell.setImage(parent.getImage());
+               shell.setImage(parent.getImage()); /* icon */
 
                /* load image for HW key button */
                imageNormal = imageRegistry.getKeyWindowImage(
@@ -145,9 +145,11 @@ public class GeneralKeyWindow extends SkinWindow {
                                GeneralKeyWindowImageName.KEYBUTTON_PUSHED);
 
                /* calculate the key window size */
+               int cntButton = Math.min(keyMapList.size(), BUTTON_DEFAULT_CNT);
+
                widthBase = imageNormal.getImageData().width;
-               heightBase = (imageNormal.getImageData().height * BUTTON_DEFAULT_CNT) +
-                               (BUTTON_VERTICAL_SPACING * (BUTTON_DEFAULT_CNT - 1));
+               heightBase = (imageNormal.getImageData().height * cntButton) +
+                               (BUTTON_VERTICAL_SPACING * (cntButton - 1));
 
                widthScrollbar = SCROLLBAR_SIZE_WIDTH + SCROLLBAR_HORIZONTAL_SPACING;
                int heightHeaderPart = (PAIRTAG_CIRCLE_SIZE + PAIRTAG_MARGIN_BOTTOM);
@@ -155,7 +157,7 @@ public class GeneralKeyWindow extends SkinWindow {
 
                /* make a frame image */
                if (keyMapList != null) {
-                       this.cntHiddenButton = keyMapList.size() - BUTTON_DEFAULT_CNT;
+                       this.cntHiddenButton = keyMapList.size() - cntButton;
                }
 
                this.imageFrame = frameMaker.getPatchedImage(