Fixed the text visibility issue in navigationbar_control/multiline style of button...
authorRajeev Ranjan <rajeev.r@samsung.com>
Tue, 30 Aug 2011 12:10:03 +0000 (21:10 +0900)
committerRajeev Ranjan <rajeev.r@samsung.com>
Mon, 5 Sep 2011 05:38:22 +0000 (14:38 +0900)
Change-Id: I1c6127f7775a4b502278cad062343a65c5dab7d5

themes/groups/button.edc
themes/inc/nbeat-hd-inc.edc

index 35dd2c4..98a9487 100644 (file)
@@ -2680,7 +2680,7 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
       }
       styles{
          style { name: "btn_multiline_style";
-            base: "font=SLP:style=Medium font_size=18 align=center color=#ffffff wrap=char";
+            base: "font=SLP:style=Medium font_size=18 align=center color=#ffffff wrap=mixed";
             tag: "br" "\n";
             tag: "ps" "ps";
             tag: "tab" "\t";
@@ -6312,8 +6312,12 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
             mouse_events: 0;
             description { state: "default" 0.0;
                align: 0.0 0.0;
-               rel1.relative: 0.0 0.0;
-               rel2.relative: 0.0 0.0;
+               rel1 {
+                  relative: 0.0 0.0;
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+               }
                min: BUTTON_NAVIBAR_CENTER_PADDING_MIN_MAX_INC;
                fixed: 1 1;
                visible: 0;
@@ -6342,54 +6346,54 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                visible: 0;
                min: 0 0;
                fixed: 1 0;
-               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
-               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               rel1 {
+                  relative: 0.0 1.0;
+                  to_x: "elm.swallow.content";
+                  to_y: "padding_left_top";
+               }
+               rel2 {
+                  relative: 1.0 0.0;
+                  to_x: "elm.swallow.content";
+                  to_y: "padding_right_bottom";
+               }
                align: 0.0 0.5;
             }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               min: BUTTON_NAVIBAR_CENTER_ICON_RECT_VISIBLE_MIN_SIZE;
-            }
-            description { state: "icononly" 0.0;
-               inherit: "default" 0.0;
-            }
          }
          part {
-            name: "padding_after_icon";
+            name: "padding_icon_text";
             type: RECT;
             scale: 1;
             mouse_events: 0;
             description { state: "default" 0.0; //when only icon or no icon is there
                visible: 0;
                align: 0.0 0.0;
-               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
-               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               rel1 {
+                  relative: 1.0 0.0;
+                  to: "icon_rect";
+               }
+               rel2 {
+                  relative: 1.0 1.0;
+                  to: "icon_rect";
+               }
                fixed: 1 0;
                min: 0 0;
-               color: 0 0 0 0;
             }
             description { state: "visible" 0.0;
                inherit: "default" 0.0;
                min: BUTTON_NAVIBAR_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC;
-            }
+               rel1 {
+                  relative: 1.0 0.0;
+                  to: "icon_rect";
+               }
+               rel2 {
+                  relative: 1.0 1.0;
+                  to: "icon_rect";
+               }
+           }
             description { state: "icononly" 0.0;
                inherit: "default" 0.0;
             }
          }
-         part {
-            name: "padding_before_text";
-            type: RECT;
-            scale: 1;
-            mouse_events: 0;
-            description { state: "default" 0.0; //when only icon or no icon is there
-               align: 1.0 0.5;
-               visible: 0;
-               rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
-               rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
-               fixed: 1 0;
-               min: BUTTON_NAVIBAR_CENTER_PADDING_BEFORE_TEXT_DEFAULT_MIN_INC;
-            }
-         }
          part { name: "elm.swallow.content";
             type: SWALLOW;
             scale: 1;
@@ -6397,8 +6401,15 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
             description { state: "default" 0.0;
                visible: 0;
                align: 0.0 0.5;
-               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
-               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "padding_left_top";
+               }
+               rel2 {
+                  relative: 1.0 0.0;
+                  to_x: "padding_left_top";
+                  to_y: "padding_right_bottom";
+               }
                fixed: 1 0;
             }
             description { state: "visible" 0.0;
@@ -6406,21 +6417,30 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                visible: 1;
                min: BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
                max: BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
-               align: 1.0 0.5;
-               rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
-               rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
-               aspect: 1.0 1.0;
-               aspect_preference: VERTICAL;
+               align: 0.0 0.5;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "padding_left_top";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to_x: "padding_left_top";
+                  to_y: "padding_right_bottom";
+               }
             }
             description { state: "icononly" 0.0;
                visible: 1;
                min: BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
                max: BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
-               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
-               rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "padding_left_top";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "padding_right_bottom";
+               }
                align: 0.5 0.5;
-               aspect: 1.0 1.0;
-               aspect_preference: VERTICAL;
             }
          }
          part { name: "elm.text";
@@ -6430,8 +6450,15 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
             clip_to: "clipper";
             description { state: "default" 0.0;
                visible: 0;
-               rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
-               rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+               rel1 {
+                  relative: 1.0 1.0;
+                  to_x: "padding_icon_text";
+                  to_y: "padding_left_top";
+               }
+               rel2 {
+                   relative: 0.0 0.0;
+                   to: "padding_right_bottom";
+               }
                align: 0.5 0.5;
                color: 255 255 255 255;
                text {
@@ -6513,7 +6540,7 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                new Float:vl;
                get_state(PART:"elm.text", st, 30, vl);
                if (!strcmp(st, "visible"))
-                  set_state(PART:"elm.text", "clicked", 0.0);
+                 set_state(PART:"elm.text", "clicked", 0.0);
             }
          }
          program { name: "button_unpress";
@@ -6532,7 +6559,7 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                     set_state(PART:"elm.text", "visible", 0.0);
                  }
                if(get_int(button_state) != BUTTON_STATE_DISABLED)
-                  set_state(PART:"button_image", "default", 0.0);
+                 set_state(PART:"button_image", "default", 0.0);
             }
             after: button_unpress;
          }
@@ -6549,11 +6576,10 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                new Float:vl;
                get_state(PART:"elm.swallow.content", st, 30, vl);
                if (!strcmp(st, "icononly"))
-               {
-                  set_state(PART:"elm.swallow.content", "visible", 0.0);
-                  set_state(PART:"icon_rect", "visible", 0.0);
-                  set_state(PART:"padding_after_icon", "visible", 0.0);
-               }
+                 {
+                    set_state(PART:"elm.swallow.content", "visible", 0.0);
+                    set_state(PART:"padding_icon_text", "visible", 0.0);
+                 }
                set_state(PART:"elm.text", "visible", 0.0);
             }
          }
@@ -6565,11 +6591,10 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                new Float:vl;
                get_state(PART:"elm.swallow.content", st, 30, vl);
                if (!strcmp(st, "visible"))
-               {
-                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
-                  set_state(PART:"icon_rect", "icononly", 0.0);
-                  set_state(PART:"padding_after_icon", "icononly", 0.0);
-               }
+                 {
+                    set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                    set_state(PART:"padding_icon_text", "icononly", 0.0);
+                 }
                set_state(PART:"elm.text", "default", 0.0);
             }
          }
@@ -6581,17 +6606,15 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
                new Float:vl;
                get_state(PART:"elm.text", st, 30, vl);
                if (!strcmp(st, "visible"))
-               {
-                  set_state(PART:"elm.swallow.content", "visible", 0.0);
-                  set_state(PART:"icon_rect", "visible", 0.0);
-                  set_state(PART:"padding_after_icon", "visible", 0.0);
-               }
+                 {
+                    set_state(PART:"elm.swallow.content", "visible", 0.0);
+                    set_state(PART:"padding_icon_text", "visible", 0.0);
+                 }
                else
-               {
-                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
-                  set_state(PART:"icon_rect", "icononly", 0.0);
-                  set_state(PART:"padding_after_icon", "icononly", 0.0);
-               }
+                 {
+                    set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                    set_state(PART:"padding_icon_text", "icononly", 0.0);
+                 }
             }
          }
          program { name: "icon_hide";
@@ -6599,8 +6622,7 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt
             source: "elm";
             action: STATE_SET "default" 0.0;
             target: "elm.swallow.content";
-            target: "icon_rect";
-            target: "padding_after_icon";
+            target: "padding_icon_text";
          }
          program { name: "disable";
             signal: "elm,state,disabled";
index 1ecfedd..205d838 100644 (file)
 #define BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC 36 36
 #define BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC 38 38
 #define BUTTON_NAVIBAR_CENTER_TEXT_FONT_SIZE_INC 32
-#define BUTTON_NAVIBAR_CENTER_MULTILINE_TEXT_FONT_SIZE_INC 28
+#define BUTTON_NAVIBAR_MULTILINE_TEXT_FONT_SIZE_INC 24
 
 #define BUTTON_NAVIBAR_LEFT_BG_NORMAL_MIN_W_INC 36
 #define BUTTON_NAVIBAR_LEFT_BG_NORMAL_MIN_H_INC 74