From dfbccd6c2ebdbb587f552c22e1fa6dc8f88a7eaa Mon Sep 17 00:00:00 2001 From: GiWoong Kim Date: Thu, 26 Jun 2014 20:51:47 +0900 Subject: [PATCH] skin: modified general key window for wearable Change-Id: I075bccc2e7f9e2b1d8991ade6014870ca32ef65b Signed-off-by: GiWoong Kim --- tizen/src/skin/client/skins/wearable-general-1btn/info.ini | 4 ++-- .../emulator/skin/layout/GeneralPurposeSkinComposer.java | 2 +- .../emulator/skin/layout/ProfileSpecificSkinComposer.java | 2 +- .../src/org/tizen/emulator/skin/menu/GeneralKeyWindow.java | 12 +++++++----- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tizen/src/skin/client/skins/wearable-general-1btn/info.ini b/tizen/src/skin/client/skins/wearable-general-1btn/info.ini index 5b2b2a9..96ef1c0 100644 --- a/tizen/src/skin/client/skins/wearable-general-1btn/info.ini +++ b/tizen/src/skin/client/skins/wearable-general-1btn/info.ini @@ -1,4 +1,4 @@ skin.name=General purpose wearable -resolution.width=320 -resolution.height=320 +resolution.width=all +resolution.height=all manager.priority=2 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 6b49aad..dc8f197 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 19fa138..c44ac49 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 2680b4a..5e1a549 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.7.4