From b20733e7e1d283d11ef2c67331d8ce7a41465ce8 Mon Sep 17 00:00:00 2001 From: Bora Hwang Date: Thu, 23 May 2013 09:43:16 +0900 Subject: [PATCH] [multibuttonentry] refactoring MBE layout Before this, MBE item has fixed max width. From now on, MBE item has flexible max width by various languages, %d, or portrait/landscape mode Change-Id: I23854d7e84c4e50d403e49f5167ca296aec86d94 --- themes/inc/tizen-hd-inc.edc | 2 +- themes/widgets/multibuttonentry.edc | 28 ++++++++++++++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/themes/inc/tizen-hd-inc.edc b/themes/inc/tizen-hd-inc.edc index b53c58a..e6f80a4 100644 --- a/themes/inc/tizen-hd-inc.edc +++ b/themes/inc/tizen-hd-inc.edc @@ -795,7 +795,7 @@ #define MULTIBUTTONENTRY_BUTTON_TEXT_MAX_INC 382 #define MULTIBUTTONENTRY_BUTTON_NINEPATCH_INC 8 8 6 8 #define MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC 32 -#define MULTIBUTTONENTRY_BUTTON_TEXT_COLOR_INC 255 255 255 255 +#define MULTIBUTTONENTRY_BUTTON_TEXT_COLOR_INC "#FFFFFF" #define MULTIBUTTONENTRY_NUMBER_TEXT_COLOR_INC 128 128 128 255 // same as multibuttonentry label #define MULTIBUTTONENTRY_CLOSEDBUTTON_SIZE_INC 64 diff --git a/themes/widgets/multibuttonentry.edc b/themes/widgets/multibuttonentry.edc index ead6c9c..6be197b 100644 --- a/themes/widgets/multibuttonentry.edc +++ b/themes/widgets/multibuttonentry.edc @@ -151,12 +151,24 @@ group { group { name: "elm/multibuttonentry/btn/default"; + styles { + style { + name: "multibuttonentry_btn_text_style"; + base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC" color="MULTIBUTTONENTRY_BUTTON_TEXT_COLOR_INC" text_class=tizen"; + } + style { + name: "multibuttonentry_btn_text_ellipsis_style"; + base: "font=Tizen:style=Regular font_size="MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC" color="MULTIBUTTONENTRY_BUTTON_TEXT_COLOR_INC" ellipsis=1 text_class=tizen"; + } + } + images { image: "00_contacts_button.png" COMP; image: "00_contacts_button_press.png" COMP; } - data.item: "button_max_size" MULTIBUTTONENTRY_BUTTON_MAX_INC; + data.item: "button_left_pad" MULTIBUTTONENTRY_BUTTON_PAD_INC; + data.item: "button_right_pad" MULTIBUTTONENTRY_BUTTON_PAD_INC; parts { part { @@ -209,17 +221,15 @@ group { } part { name: "elm.btn.text"; - type: TEXT; + type: TEXTBLOCK; mouse_events: 0; + multiline: 0; scale: 1; description { state: "default" 0.0; - color: MULTIBUTTONENTRY_BUTTON_TEXT_COLOR_INC; text { - font: "Tizen:style=Regular"; - size: MULTIBUTTONENTRY_BUTTON_TEXT_SIZE_INC; + style: "multibuttonentry_btn_text_style"; min: 1 0; - text_class: "tizen"; } rel1 { relative: 1.0 0.0; @@ -233,8 +243,10 @@ group { description { state: "ellipsis" 0.0; inherit: "default" 0.0; - min: MULTIBUTTONENTRY_BUTTON_TEXT_MAX_INC 0; - text.min: 0 0; + text { + style: "multibuttonentry_btn_text_ellipsis_style"; + min: 0 0; + } } } part { name: "events"; -- 2.7.4