From 6d1119d5dc06d31254cd97298d6c14c3acf9092c Mon Sep 17 00:00:00 2001 From: Jaehwan Kim Date: Mon, 11 Apr 2011 15:06:32 +0900 Subject: [PATCH] [button] navigation_controlbar style: disable color, align Change-Id: I1c9c5ef2455a631c90954f6caa181b420c674afd --- themes/groups/button.edc | 231 +++++++++++++++++++++++++++++++---------------- 1 file changed, 151 insertions(+), 80 deletions(-) diff --git a/themes/groups/button.edc b/themes/groups/button.edc index 4390e05..ca17595 100644 --- a/themes/groups/button.edc +++ b/themes/groups/button.edc @@ -8842,9 +8842,10 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt script { public button_state = BUTTON_STATE_ENABLED; } + images.image: "00_option_header_press.png" COMP; parts { part { name: "button_image"; - type: RECT; + type: IMAGE; mouse_events: 1; scale: 1; description { state: "default" 0.0; @@ -8852,10 +8853,14 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt color: 0 0 0 0; rel1.offset: 5 5; rel2.offset: -6 -6; + image.normal: "00_option_header_press.png"; + image.border: 2 2 2 2; + color: 255 255 255 255; + visible: 0; } description { state: "clicked" 0.0; inherit: "default" 0.0; - color: 187 127 16 255; + visible: 1; } } part { @@ -8952,7 +8957,7 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt rel2 { relative: 1.0 1.0; to: "icon_rect"; } fixed: 1 0; min: 0 0; - color: 0 255 0 100; + color: 0 0 0 0; } description { state: "visible" 0.0; visible: 1; @@ -8994,8 +8999,8 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt description { state: "visible" 0.0; fixed: 1 0; visible: 1; - min: 22 22; - max: 22 22; + min: 22 22; + max: 22 22; align: 1.0 0.5; rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_bottom"; } @@ -9041,15 +9046,16 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt visible: 1; min: 0 0; color: 255 255 255 255; + color2: 0 0 0 102; } description { state: "disabled" 0.0; inherit: "default" 0.0; - color: 0 0 0 128; + color: 185 185 185 255; color3: 0 0 0 0; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; - color: BUTTON_ICON_TEXT_DISABLED_COLOR_INC; + color: 185 185 185 255; color3: 0 0 0 0; visible: 1; min: 90 24; @@ -9058,7 +9064,8 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt inherit: "default" 0.0; visible: 1; min: 0 0; - color: BUTTON_ICON_TEXT_FOCUSED_COLOR_INC; + color: 255 255 255 255; + color2: 0 0 0 102; } } part { name: "over2"; @@ -9282,9 +9289,10 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt script { public button_state = BUTTON_STATE_ENABLED; } + images.image: "00_option_header_press.png" COMP; parts { part { name: "button_image"; - type: RECT; + type: IMAGE; mouse_events: 1; scale: 1; description { state: "default" 0.0; @@ -9292,10 +9300,14 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt color: 0 0 0 0; rel1.offset: 5 5; rel2.offset: -6 -6; + image.normal: "00_option_header_press.png"; + image.border: 2 2 2 2; + color: 255 255 255 255; + visible: 0; } description { state: "clicked" 0.0; - inherit: "default" 0.0; - color: 187 127 16 255; + inherit: "default" 0.0; + visible: 1; } } part { @@ -9361,16 +9373,28 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt mouse_events: 0; description { state: "default" 0.0; visible: 1; - min: 0 40; + min: 0 0; fixed: 1 0; - rel1 {relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_top"; } - rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_bottom"; } + rel1 { relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 { relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } + description { state: "visible" 0.0; + visible: 1; + min: 22 22; + fixed: 1 0; + rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } + align: 0.0 0.5; + color: 0 0 0 0; + } + description { state: "icononly" 0.0; + inherit: "default" 0.0; + } } part { - name: "padding_icon_text"; + name: "padding_after_icon"; type: RECT; scale: 1; mouse_events: 0; @@ -9382,10 +9406,8 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt min: 0 0; color: 0 0 0 0; } - description { state: "icononly" 0.0; - inherit: "default" 0.0; - } - description { state: "visible" 0.0; //when icon is visible + description { state: "visible" 0.0; + visible: 1; align: 0.0 0.0; rel1 { relative: 1.0 0.0; to: "icon_rect"; } rel2 { relative: 1.0 1.0; to: "icon_rect"; } @@ -9393,6 +9415,23 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt min: 6 0; color: 0 0 0 0; } + 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; + rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_bottom"; } + fixed: 1 0; + min: 6 0; + color: 0 0 0 0; + } } part { name: "elm.swallow.content"; type: SWALLOW; @@ -9400,8 +9439,8 @@ 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_x: "padding_left"; to_y: "padding_top"; } - rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } + rel1 { relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 { relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; @@ -9409,9 +9448,9 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt visible: 1; min: 22 22; max: 22 22; - align: 0.0 0.5; - rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } - rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } + align: 1.0 0.5; + rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } @@ -9419,8 +9458,8 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt visible: 1; min: 30 30; max: 30 30; - rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } - rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; } + rel1 { relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; } align: 0.5 0.5; aspect: 1.0 1.0; aspect_preference: VERTICAL; @@ -9432,7 +9471,7 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt scale: 1; description { state: "default" 0.0; visible: 0; - rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; } + rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; } align: 0.0 0.5; color: 255 255 255 255; @@ -9440,14 +9479,14 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt font: "SLP:style=Medium"; size: 20; min: 0 0; - align: 0.5 0.5; + align: 0.0 0.5; max: 1 0; } } description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; - min: 90 40; + min: 90 24; } description { state: "clicked" 0.0; inherit: "default" 0.0; @@ -9458,15 +9497,15 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt } description { state: "disabled" 0.0; inherit: "default" 0.0; - color: 0 0 0 128; + color: 185 185 185 255; color3: 0 0 0 0; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; - color: 0 0 0 128; + color: 185 185 185 255; color3: 0 0 0 0; visible: 1; - min: 90 40; + min: 90 24; } description { state: "focused" 0.0; inherit: "default" 0.0; @@ -9545,10 +9584,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")) - { - emit("elm,action,default,text,set", ""); - set_state(PART:"elm.text", "visible", 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); } @@ -9581,7 +9620,8 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); - set_state(PART:"padding_icon_text", "visible", 0.0); + set_state(PART:"icon_rect", "visible", 0.0); + set_state(PART:"padding_after_icon", "visible", 0.0); } if(get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); @@ -9599,7 +9639,8 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt 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:"icon_rect", "icononly", 0.0); + set_state(PART:"padding_after_icon", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } @@ -9614,12 +9655,14 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt 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:"icon_rect", "visible", 0.0); + set_state(PART:"padding_after_icon", "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:"icon_rect", "icononly", 0.0); + set_state(PART:"padding_after_icon", "icononly", 0.0); } } } @@ -9672,15 +9715,11 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt } } program { name: "focused"; - //signal: "elm,action,focus"; - //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; - //signal: "elm,action,unfocus"; - //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; @@ -9697,9 +9736,10 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt script { public button_state = BUTTON_STATE_ENABLED; } + images.image: "00_option_header_press.png" COMP; parts { part { name: "button_image"; - type: RECT; + type: IMAGE; mouse_events: 1; scale: 1; description { state: "default" 0.0; @@ -9707,10 +9747,14 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt color: 0 0 0 0; rel1.offset: 5 5; rel2.offset: -6 -6; + image.normal: "00_option_header_press.png"; + image.border: 2 2 2 2; + color: 255 255 255 255; + visible: 0; } description { state: "clicked" 0.0; - inherit: "default" 0.0; - color: 187 127 16 255; + inherit: "default" 0.0; + visible: 1; } } part { @@ -9776,34 +9820,61 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt mouse_events: 0; description { state: "default" 0.0; visible: 1; - min: 0 40; + min: 0 0; fixed: 1 0; - rel1 {relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_top"; } - rel2 {relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_bottom"; } + rel1 { relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 { relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } + align: 0.0 0.5; + color: 0 0 0 0; + } + description { state: "visible" 0.0; + visible: 1; + min: 22 22; + fixed: 1 0; + rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } align: 0.0 0.5; color: 0 0 0 0; } + description { state: "icononly" 0.0; + inherit: "default" 0.0; + } } part { - name: "padding_icon_text"; + name: "padding_after_icon"; 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; - rel1 { relative: 0.0 0.0; to: "elm.text"; } - rel2 { relative: 0.0 1.0; to: "elm.text"; } + align: 0.0 0.0; + 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; + visible: 1; + align: 0.0 0.0; + rel1 { relative: 1.0 0.0; to: "icon_rect"; } + rel2 { relative: 1.0 1.0; to: "icon_rect"; } + fixed: 1 0; + min: 6 0; + color: 0 0 0 0; + } description { state: "icononly" 0.0; inherit: "default" 0.0; } - description { state: "visible" 0.0; //when icon is visible + } + 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; - rel1 { relative: 0.0 0.0; to: "elm.text"; } - rel2 { relative: 0.0 1.0; to: "elm.text"; } + rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_bottom"; } fixed: 1 0; min: 6 0; color: 0 0 0 0; @@ -9815,8 +9886,8 @@ 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_x: "padding_left"; to_y: "padding_top"; } - rel2 {relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } + rel1 { relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 { relative: 1.0 0.0; to_x: "padding_left"; to_y: "padding_bottom"; } fixed: 1 0; } description { state: "visible" 0.0; @@ -9825,8 +9896,8 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt min: 22 22; max: 22 22; align: 1.0 0.5; - rel1 {relative: 0.0 1.0; to_x: "padding_icon_text"; to_y: "padding_top"; } - rel2 {relative: 0.0 0.0; to_x: "padding_icon_text"; to_y: "padding_bottom"; } + rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_bottom"; } aspect: 1.0 1.0; aspect_preference: VERTICAL; } @@ -9834,8 +9905,8 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt visible: 1; min: 30 30; max: 30 30; - rel1 {relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } - rel2 {relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; } + rel1 { relative: 1.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y: "padding_bottom"; } align: 0.5 0.5; aspect: 1.0 1.0; aspect_preference: VERTICAL; @@ -9847,7 +9918,7 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt scale: 1; description { state: "default" 0.0; visible: 0; - rel1 { relative: 0.0 1.0; to_x: "padding_left"; to_y: "padding_top"; } + rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_top"; } rel2 { relative: 0.0 0.0; to_x: "padding_right"; to_y:"padding_bottom"; } align: 1.0 0.5; color: 255 255 255 255; @@ -9862,7 +9933,7 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt description { state: "visible" 0.0; inherit: "default" 0.0; visible: 1; - min: 90 40; + min: 90 24; } description { state: "clicked" 0.0; inherit: "default" 0.0; @@ -9873,15 +9944,15 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt } description { state: "disabled" 0.0; inherit: "default" 0.0; - color: 0 0 0 128; + color: 185 185 185 255; color3: 0 0 0 0; } description { state: "disabled_visible" 0.0; inherit: "default" 0.0; - color: 0 0 0 128; + color: 185 185 185 255; color3: 0 0 0 0; visible: 1; - min: 90 40; + min: 90 24; } description { state: "focused" 0.0; inherit: "default" 0.0; @@ -9960,10 +10031,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")) - { - emit("elm,action,default,text,set", ""); - set_state(PART:"elm.text", "visible", 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); } @@ -9996,7 +10067,8 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt if (!strcmp(st, "icononly")) { set_state(PART:"elm.swallow.content", "visible", 0.0); - set_state(PART:"padding_icon_text", "visible", 0.0); + set_state(PART:"icon_rect", "visible", 0.0); + set_state(PART:"padding_after_icon", "visible", 0.0); } if(get_int(button_state) != BUTTON_STATE_DISABLED) set_state(PART:"elm.text", "visible", 0.0); @@ -10014,7 +10086,8 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt 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:"icon_rect", "icononly", 0.0); + set_state(PART:"padding_after_icon", "icononly", 0.0); } set_state(PART:"elm.text", "default", 0.0); } @@ -10029,12 +10102,14 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt 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:"icon_rect", "visible", 0.0); + set_state(PART:"padding_after_icon", "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:"icon_rect", "icononly", 0.0); + set_state(PART:"padding_after_icon", "icononly", 0.0); } } } @@ -10087,15 +10162,11 @@ BUTTON_EDIT_STYLES("icon_expand/extended", "00_button_icon_expand.png", "00_butt } } program { name: "focused"; - //signal: "elm,action,focus"; - //source: "elm"; action: STATE_SET "focused" 0.0; target: "button_image"; target: "elm.text"; } program { name: "unfocused"; - //signal: "elm,action,unfocus"; - //source: "elm"; action: STATE_SET "default" 0.0; target: "button_image"; after: "unfocus_text"; -- 2.7.4