From: Rajeev Ranjan Date: Mon, 17 Oct 2011 09:53:29 +0000 (+0530) Subject: [Corrected Indentation and code cleanup in button.edc for base multiline and base... X-Git-Tag: submit/2.0alpha-wayland/20121130.000903~464^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ccd38921fe60a1dc5871232a8b20025d168a2f4a;p=profile%2Fivi%2Fefl-theme-tizen.git [Corrected Indentation and code cleanup in button.edc for base multiline and base default style] Change-Id: I5aadde0e6f2fa702866c5c68f2bbb951e24cf17b --- diff --git a/themes/groups/button.edc b/themes/groups/button.edc index b302b5d..d657399 100644 --- a/themes/groups/button.edc +++ b/themes/groups/button.edc @@ -2985,7 +2985,6 @@ } parts { part { name: "button_image"; - mouse_events: 1; scale: 1; description { state: "default" 0.0; min: 10 46; @@ -2997,47 +2996,52 @@ } description { state: "clicked" 0.0; inherit: "default" 0.0; - image.normal: "00_button_04_press.png"; + image { + normal: "00_button_04_press.png"; + } } description { state: "disabled" 0.0; inherit: "default" 0.0; - image.normal: "00_button_04_dim.png"; + image { + normal: "00_button_04_dim.png"; + } } description { state: "focused" 0.0; inherit: "default" 0.0; - image.normal: "00_button_04_press.png"; + image { + normal: "00_button_04_press.png"; + } } } - part { - name: "padding_left_top"; + part { name: "padding_left_top"; type: RECT; scale: 1; 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; + rel2 { + relative: 0.0 0.0; + } min: 2 2; fixed: 1 1; visible: 0; } } - part { - name: "padding_right_bottom"; + part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; - rel1.relative: 1.0 1.0; - rel2.relative: 1.0 1.0; + rel1 { + relative: 1.0 1.0; + } min: 2 2; fixed: 1 1; visible: 0; } } - part { - name: "icon_rect"; + part { name: "icon_rect"; type: RECT; scale: 1; mouse_events: 0; @@ -3045,21 +3049,33 @@ visible: 1; min: 0 40; fixed: 1 0; - 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"; } + 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; color: 0 0 0 0; } } - part { - name: "padding_icon_text"; + part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there 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 { + to: "icon_rect"; + } fixed: 1 0; min: 0 0; color: 0 0 0 0; @@ -3069,8 +3085,13 @@ } description { state: "visible" 0.0; //when icon is visible 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 { + to: "icon_rect"; + } fixed: 1 0; min: 5 0; color: 0 0 0 0; @@ -3079,28 +3100,46 @@ part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; + clip_to: "clipper"; 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; fixed: 1 0; - visible: 1; 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"; + } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; - visible: 1; min: 40 40; - 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; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to: "padding_right_bottom"; + } aspect: 1.0 1.0; aspect_preference: VERTICAL; } @@ -3109,11 +3148,18 @@ type: TEXTBLOCK; mouse_events: 0; scale: 1; + clip_to: "clipper"; description { state: "default" 0.0; visible: 0; - 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; + 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"; + } color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC; text { style: "btn_multiline_style"; @@ -3151,7 +3197,6 @@ } part { name: "over2"; type: RECT; - mouse_events: 1; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; @@ -3160,12 +3205,17 @@ } part { name: "over3"; type: RECT; - mouse_events: 1; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } + part { name: "clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 255; + } + } part { name: "disabler"; type: RECT; description { state: "default" 0.0; @@ -3196,7 +3246,7 @@ 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"; @@ -3210,12 +3260,12 @@ new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) - { - emit("elm,action,default,text,set", ""); - set_state(PART:"elm.text", "visible", 0.0); - } - if(get_int(button_state) != BUTTON_STATE_DISABLED) - set_state(PART:"button_image", "default", 0.0); + { + emit("elm,action,default,text,set", ""); + set_state(PART:"elm.text", "visible", 0.0); + } + if (get_int(button_state) != BUTTON_STATE_DISABLED) + set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } @@ -3232,11 +3282,11 @@ 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:"padding_icon_text", "visible", 0.0); - } - if(get_int(button_state) != BUTTON_STATE_DISABLED) + { + set_state(PART:"elm.swallow.content", "visible", 0.0); + set_state(PART:"padding_icon_text", "visible", 0.0); + } + if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); @@ -3250,10 +3300,10 @@ 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:"padding_icon_text", "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); } } @@ -3265,15 +3315,15 @@ 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:"padding_icon_text", "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:"padding_icon_text", "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"; @@ -3297,9 +3347,9 @@ new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) - set_state(PART:"elm.text", "disabled_visible", 0.0); + set_state(PART:"elm.text", "disabled_visible", 0.0); else - set_state(PART:"elm.text", "disabled", 0.0); + set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } } @@ -3317,9 +3367,9 @@ new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "disabled_visible")) - set_state(PART:"elm.text", "visible", 0.0); + set_state(PART:"elm.text", "visible", 0.0); else - set_state(PART:"elm.text", "default", 0.0); + set_state(PART:"elm.text", "default", 0.0); set_int(button_state, BUTTON_STATE_ENABLED); } } @@ -3356,7 +3406,6 @@ } parts { part { name: "button_image"; - mouse_events: 1; scale: 1; description { state: "default" 0.0; min: 16 38; @@ -3368,54 +3417,64 @@ } description { state: "clicked" 0.0; inherit: "default" 0.0; - image.normal: "00_button_01_normal_press.png"; + image { + normal: "00_button_01_normal_press.png"; + } } description { state: "disabled" 0.0; inherit: "default" 0.0; - image.normal: "00_button_01_normal_dim.png"; + image { + normal: "00_button_01_normal_dim.png"; + } } description { state: "focused" 0.0; inherit: "default" 0.0; - image.normal: "00_button_01_normal_press.png"; + image { + normal: "00_button_01_normal_press.png"; + } } } - part { - name: "padding_left_top"; + part { name: "padding_left_top"; type: RECT; scale: 1; 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; + rel2 { + relative: 0.0 0.0; + } min: 2 2; fixed: 1 1; visible: 0; } } - part { - name: "padding_right_bottom"; + part { name: "padding_right_bottom"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; align: 1.0 1.0; - rel1.relative: 1.0 1.0; - rel2.relative: 1.0 1.0; + rel1 { + relative: 1.0 1.0; + } min: 2 2; fixed: 1 1; visible: 0; } } - part { - name: "padding_icon_text"; + part { name: "padding_icon_text"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; //when only icon or no icon is there align: 0.0 0.0; - rel1 { relative: 1.0 0.0; to: "elm.swallow.content"; } - rel2 { relative: 1.0 1.0; to: "elm.swallow.content"; } + rel1 { + relative: 1.0 0.0; + to: "elm.swallow.content"; + } + rel2 { + to: "elm.swallow.content"; + } fixed: 1 0; min: 0 0; color: 0 0 0 0; @@ -3425,8 +3484,13 @@ } description { state: "visible" 0.0; //when icon is visible align: 0.0 0.0; - rel1 { relative: 1.0 0.0; to: "elm.swallow.content"; } - rel2 { relative: 1.0 1.0; to: "elm.swallow.content"; } + rel1 { + relative: 1.0 0.0; + to: "elm.swallow.content"; + } + rel2 { + to: "elm.swallow.content"; + } fixed: 1 0; min: 5 0; color: 0 0 0 0; @@ -3435,28 +3499,46 @@ part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; + clip_to: "clipper"; 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; fixed: 1 0; - visible: 1; 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"; + } aspect: 1.0 1.0; aspect_preference: VERTICAL; } description { state: "icononly" 0.0; - visible: 1; min: 38 38; - rel1 { relative: 1.0 0.0; to_x: "padding_left_top"; } - rel2 { relative: 0.0 1.0; to_x: "padding_right_bottom"; } - align: 0.5 0.5; + rel1 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "padding_right_bottom"; + } aspect: 1.0 1.0; aspect_preference: VERTICAL; } @@ -3465,17 +3547,23 @@ type: TEXT; mouse_events: 0; scale: 1; + clip_to: "clipper"; description { state: "default" 0.0; visible: 0; - 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; + 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"; + } color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC; text { font: "SLP:style=Medium"; size: 24; min: 0 0; - align: 0.5 0.5; } } description { state: "visible" 0.0; @@ -3508,7 +3596,6 @@ } part { name: "over2"; type: RECT; - mouse_events: 1; repeat_events: 1; ignore_flags: ON_HOLD; description { state: "default" 0.0; @@ -3517,12 +3604,17 @@ } part { name: "over3"; type: RECT; - mouse_events: 1; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } + part { name: "clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 255; + } + } part { name: "disabler"; type: RECT; description { state: "default" 0.0; @@ -3553,7 +3645,7 @@ 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"; @@ -3567,12 +3659,12 @@ new Float:vl; get_state(PART:"elm.swallow.content", st, 30, vl); if (strcmp(st, "icononly")) - { - emit("elm,action,default,text,set", ""); - set_state(PART:"elm.text", "visible", 0.0); - } - if(get_int(button_state) != BUTTON_STATE_DISABLED) - set_state(PART:"button_image", "default", 0.0); + { + emit("elm,action,default,text,set", ""); + set_state(PART:"elm.text", "visible", 0.0); + } + if (get_int(button_state) != BUTTON_STATE_DISABLED) + set_state(PART:"button_image", "default", 0.0); } after: button_unpress; } @@ -3589,11 +3681,11 @@ 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:"padding_icon_text", "visible", 0.0); - } - if(get_int(button_state) != BUTTON_STATE_DISABLED) + { + set_state(PART:"elm.swallow.content", "visible", 0.0); + set_state(PART:"padding_icon_text", "visible", 0.0); + } + if (get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); else set_state(PART:"elm.text", "disabled_visible", 0.0); @@ -3607,10 +3699,10 @@ 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:"padding_icon_text", "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); } } @@ -3622,15 +3714,15 @@ 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:"padding_icon_text", "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:"padding_icon_text", "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"; @@ -3654,9 +3746,9 @@ new Float:vl; get_state(PART:"elm.text", st, 30, vl); if (!strcmp(st, "visible")) - set_state(PART:"elm.text", "disabled_visible", 0.0); + set_state(PART:"elm.text", "disabled_visible", 0.0); else - set_state(PART:"elm.text", "disabled", 0.0); + set_state(PART:"elm.text", "disabled", 0.0); set_int(button_state, BUTTON_STATE_DISABLED); } }