From cd0c992987457ab3cf4259f626a9ce518e2a151d Mon Sep 17 00:00:00 2001 From: GiWoong Kim Date: Fri, 27 Jun 2014 14:24:46 +0900 Subject: [PATCH] skin: modified general key window for wearable Change-Id: Ica1d4145b2a92a595b300b323b8968c49cca333c Signed-off-by: GiWoong Kim --- .../skin/layout/GeneralPurposeSkinComposer.java | 2 +- .../skin/layout/ProfileSpecificSkinComposer.java | 2 +- .../tizen/emulator/skin/menu/GeneralKeyWindow.java | 12 +++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) 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 6b49aad89f..dc8f197897 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 @@ -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 diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/ProfileSpecificSkinComposer.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/ProfileSpecificSkinComposer.java index 19fa138284..c44ac49997 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/ProfileSpecificSkinComposer.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/ProfileSpecificSkinComposer.java @@ -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 diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/GeneralKeyWindow.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/GeneralKeyWindow.java index 2680b4a851..5e1a549523 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/GeneralKeyWindow.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/menu/GeneralKeyWindow.java @@ -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( -- 2.34.1