[multibuttonentry] refactoring MBE layout
authorBora Hwang <bora1.hwang@samsung.com>
Thu, 23 May 2013 00:43:16 +0000 (09:43 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 11:28:01 +0000 (20:28 +0900)
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
themes/widgets/multibuttonentry.edc

index b53c58a..e6f80a4 100644 (file)
 #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
 
index ead6c9c..6be197b 100644 (file)
@@ -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";