From: ak.singh7 Date: Thu, 26 May 2011 09:10:07 +0000 (+0530) Subject: [check.edc]modified the default style to support list requirements and removed the... X-Git-Tag: submit/2.0alpha-wayland/20121130.000903~775^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=462fb2f827d7f241c9a8b0c78ddbfa73bacffdfe;p=profile%2Fivi%2Fefl-theme-tizen.git [check.edc]modified the default style to support list requirements and removed the list style Change-Id: I02801bf995b5db9e80b17269d02749420292ec67 --- diff --git a/themes/groups/check.edc b/themes/groups/check.edc index 76c928b..68ff3fd 100644 --- a/themes/groups/check.edc +++ b/themes/groups/check.edc @@ -26,352 +26,8 @@ #define CHECK_STATE_VISIBLE 1 #define CHECK_STATE_DISABLED_VISIBLE 2 #define CHECK_STATE_DISABLED 3 -/////////////////////////////////////////////////////////////////////////////////////// -#define CHECK_STYLE_DEFAULT(style_name, min_width, min_height) \ - group { name: "elm/check/base/"style_name; \ - images { \ - image: "00_check_bg.png" COMP; \ - image: "00_check_bg_press.png" COMP; \ - image: "00_check_bg_dim.png" COMP; \ - image: "00_check_checking.png" COMP; \ - } \ - script { \ - public check_state = CHECK_STATE_DEFAULT; \ - } \ - parts { \ - part { name: "back_bg"; \ - type: RECT; \ - mouse_events: 1; \ - scale: 1; \ - description { state: "default" 0.0; \ - rel2.relative: 0.0 1.0; \ - align: 0 0.5; \ - min: min_width min_height; \ - fixed: 1 0; \ - visible: 1; \ - color: 0 0 0 0; \ - } \ - } \ - part { name: "bg"; \ - mouse_events: 0; \ - scale: 1; \ - description { state: "default" 0.0; \ - min: 26 26; \ - max: 26 26; \ - fixed: 1 1; \ - rel1{ to: "back_bg"; } \ - rel2{ to: "back_bg"; } \ - align: 0.5 0.5; \ - visible: 1; \ - image { \ - normal: "00_check_bg.png"; \ - } \ - fill.smooth : 0; \ - } \ - description { state: "pressed" 0.0; \ - inherit: "default" 0.0; \ - image { \ - normal: "00_check_bg_press.png"; \ - } \ - fill.smooth : 0; \ - } \ - description { state: "disabled" 0.0; \ - inherit: "default" 0.0; \ - image { \ - normal: "00_check_bg_dim.png"; \ - } \ - fill.smooth : 0; \ - } \ - } \ - part { name: "check"; \ - mouse_events: 0; \ - scale: 1; \ - description { state: "default" 0.0; \ - rel1.to: "bg"; \ - rel2.to: "bg"; \ - visible: 0; \ - } \ - description { state: "visible" 0.0; \ - inherit: "default" 0.0; \ - visible: 1; \ - image.normal: "00_check_checking.png"; \ - } \ - description { state: "pressed" 0.0; \ - inherit: "default" 0.0; \ - visible: 1; \ - image.normal: "00_check_checking.png"; \ - } \ - description { state: "disabled_visible" 0.0; \ - inherit: "visible" 0.0; \ - visible: 1; \ - } \ - } \ - part { name: "elm.swallow.content"; \ - type: SWALLOW; \ - description { state: "default" 0.0; \ - fixed: 1 0; \ - visible: 0; \ - color: 255 255 255 255; \ - align: 0.0 0.5; \ - rel1.to_x: "bg"; \ - rel1.relative: 1.0 0.0; \ - rel1.offset: 1 1; \ - rel2.to_x: "bg"; \ - rel2.relative: 1.0 1.0; \ - rel2.offset: 2 -2; \ - } \ - description { state: "visible" 0.0; \ - inherit: "default" 0.0; \ - fixed: 1 1; \ - visible: 1; \ - aspect: 1.0 1.0; \ - aspect_preference: VERTICAL; \ - } \ - description { state: "disabled" 0.0; \ - inherit: "default" 0.0; \ - color: 128 128 128 128; \ - } \ - description { state: "disabled_visible" 0.0; \ - inherit: "default" 0.0; \ - color: 128 128 128 128; \ - fixed: 1 1; \ - visible: 1; \ - aspect: 1.0 1.0; \ - } \ - } \ - part { name: "elm.text"; \ - type: TEXTBLOCK; \ - mouse_events: 0; \ - scale: 1; \ - description { state: "default" 0.0; \ - visible: 0; \ - fixed: 0 1; \ - rel1 { relative: 1.0 0.5; offset: 1 1; to_x: "elm.swallow.content"; } \ - rel2 { relative: 1.0 0.5; offset: -2 -2; } \ - align: 0.0 0.5; \ - text { \ - style: "check_label_textblock_style"; \ - min: 0 0; \ - } \ - color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \ - } \ - description { state: "visible" 0.0; \ - inherit: "default" 0.0; \ - visible: 1; \ - text.min: 1 1; \ - } \ - description { state: "pressed" 0.0; \ - inherit: "default" 0.0; \ - visible: 1; \ - text.min: 1 1; \ - color: CHECK_DEFAULT_TEXT_PRESSED_COLOR_INC; \ - } \ - description { state: "disabled" 0.0; \ - inherit: "default" 0.0; \ - } \ - description { state: "disabled_visible" 0.0; \ - inherit: "default" 0.0; \ - visible: 1; \ - text.min: 1 1; \ - color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \ - } \ - } \ - part { name: "events1"; \ - type: RECT; \ - ignore_flags: ON_HOLD; \ - description { state: "default" 0.0; \ - color: 0 0 0 0; \ - } \ - } \ - part { name: "events2"; \ - type: RECT; \ - repeat_events: 1; \ - description { state: "default" 0.0; \ - color: 0 0 0 0; \ - } \ - } \ - part { name: "disabler"; \ - type: RECT; \ - description { state: "default" 0.0; \ - color: 0 0 0 0; \ - visible: 0; \ - } \ - description { state: "disabled" 0.0; \ - inherit: "default" 0.0; \ - visible: 1; \ - } \ - } \ - } \ - programs { \ - program { name: "click"; \ - signal: "mouse,clicked,1"; \ - source: "events1"; \ - action: SIGNAL_EMIT "elm,action,check,toggle" ""; \ - } \ - program { name: "bg_normal"; \ - signal: "mouse,up,1"; \ - source: "events2"; \ - script { \ - new st[31]; \ - new Float:vl; \ - if(get_int(check_state) == CHECK_STATE_VISIBLE) \ - set_state(PART:"check", "visible", 0.0); \ - else if(get_int(check_state) == CHECK_STATE_DEFAULT)\ - set_state(PART:"check", "default", 0.0); \ - else \ - set_state(PART:"check", "disabled_visible", 0.0); \ - set_state(PART:"bg", "default", 0.0); \ - get_state(PART:"elm.text", st, 30, vl); \ - if (!strcmp(st, "pressed")) \ - set_state(PART:"elm.text", "visible", 0.0); \ - } \ - } \ - program { name: "pressed"; \ - signal: "mouse,down,1"; \ - source: "events2"; \ - script { \ - new st[31]; \ - new Float:vl; \ - get_state(PART:"check", st, 30, vl); \ - if (!strcmp(st, "default")) \ - set_state(PART:"check", "pressed", 0.0); \ - else \ - set_state(PART:"check", "default", 0.0); \ - set_state(PART:"bg", "pressed", 0.0); \ - get_state(PART:"elm.text", st, 30, vl); \ - if (!strcmp(st, "visible")) \ - set_state(PART:"elm.text", "pressed", 0.0); \ - } \ - } \ - program { name: "mouse,out"; \ - signal: "mouse,out"; \ - source: "events2"; \ - script { \ - if(get_int(check_state) == CHECK_STATE_VISIBLE) \ - set_state(PART:"check", "visible", 0.0); \ - else \ - set_state(PART:"check", "default", 0.0); \ - } \ - } \ - program { name: "check_on"; \ - signal: "elm,state,check,on"; \ - source: "elm"; \ - script { \ - set_int(check_state, CHECK_STATE_VISIBLE); \ - set_state(PART:"check", "visible", 0.0); \ - } \ - } \ - program { name: "check_off"; \ - signal: "elm,state,check,off"; \ - source: "elm"; \ - action: STATE_SET "default" 0.0; \ - target: "check"; \ - script { \ - if(get_int(check_state) == CHECK_STATE_VISIBLE) \ - { \ - set_int(check_state, CHECK_STATE_DEFAULT); \ - set_state(PART:"check", "default", 0.0); \ - } \ - } \ - } \ - program { name: "text_show"; \ - signal: "elm,state,text,visible"; \ - source: "elm"; \ - action: STATE_SET "visible" 0.0; \ - target: "elm.text"; \ - } \ - program { name: "text_hide"; \ - signal: "elm,state,text,hidden"; \ - source: "elm"; \ - action: STATE_SET "default" 0.0; \ - target: "elm.text"; \ - } \ - program { name: "icon_show"; \ - signal: "elm,state,icon,visible"; \ - source: "elm"; \ - action: STATE_SET "visible" 0.0; \ - target: "elm.swallow.content"; \ - } \ - program { name: "icon_hide"; \ - signal: "elm,state,icon,hidden"; \ - source: "elm"; \ - action: STATE_SET "default" 0.0; \ - target: "elm.swallow.content"; \ - } \ - program { name: "disable"; \ - signal: "elm,state,disabled"; \ - source: "elm"; \ - action: STATE_SET "disabled" 0.0; \ - target: "disabler"; \ - target: "bg"; \ - after: "disable_text"; \ - } \ - program { name: "disable_text"; \ - script { \ - new st[31]; \ - new Float:vl; \ - get_state(PART:"elm.text", st, 30, vl); \ - if (!strcmp(st, "visible")) \ - set_state(PART:"elm.text", "disabled_visible", 0.0); \ - else \ - set_state(PART:"elm.text", "disabled", 0.0); \ - get_state(PART:"elm.swallow.content", st, 30, vl); \ - if (!strcmp(st, "visible")) \ - set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \ - else \ - set_state(PART:"elm.swallow.content", "disabled", 0.0); \ - get_state(PART:"check", st, 30, vl); \ - if (!strcmp(st, "visible")) \ - { \ - set_state(PART:"check", "disabled_visible", 0.0); \ - set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \ - } \ - } \ - } \ - program { name: "enable"; \ - signal: "elm,state,enabled"; \ - source: "elm"; \ - action: STATE_SET "default" 0.0; \ - target: "disabler"; \ - target: "bg"; \ - after: "enable_text"; \ - } \ - program { name: "enable_text"; \ - script { \ - new st[31]; \ - new Float:vl; \ - get_state(PART:"elm.text", st, 30, vl); \ - if (!strcmp(st, "disabled_visible")) \ - set_state(PART:"elm.text", "visible", 0.0); \ - else \ - set_state(PART:"elm.text", "default", 0.0); \ - get_state(PART:"elm.swallow.content", st, 30, vl); \ - if (!strcmp(st, "visible")) \ - set_state(PART:"elm.swallow.content", "visible", 0.0); \ - else \ - set_state(PART:"elm.swallow.content", "default", 0.0); \ - get_state(PART:"check", st, 30, vl); \ - if (!strcmp(st, "disabled_visible")) \ - { \ - set_state(PART:"check", "visible", 0.0); \ - set_int(check_state, CHECK_STATE_VISIBLE); \ - } \ - else \ - set_int(check_state, CHECK_STATE_DEFAULT); \ - } \ - } \ - } \ - } - -//////////////////////////////////////////////////////////////////////////////// -CHECK_STYLE_DEFAULT("default", 26, 26) - -//////////////////////////////////////////////////////////////////////////////// -CHECK_STYLE_DEFAULT("default/extended", 60, 75) - //////////////////////////////////////////////////////////////////////////////// - -#define CHECK_STYLE_LIST(style_name, min_width, min_height) \ +#define CHECK_STYLE_DEFAULT(style_name, min_width, min_height) \ group { name: "elm/check/base/"style_name; \ images { \ image: "00_check_bg.png" COMP; \ @@ -642,12 +298,11 @@ CHECK_STYLE_DEFAULT("default/extended", 60, 75) } \ } \ } - //////////////////////////////////////////////////////////////////////////////// -CHECK_STYLE_LIST("list", 26, 26) +CHECK_STYLE_DEFAULT("default", 26, 26) //////////////////////////////////////////////////////////////////////////////// -CHECK_STYLE_LIST("list/extended", 60, 75) +CHECK_STYLE_DEFAULT("default/extended", 60, 75) //////////////////////////////////////////////////////////////////////////////// group { name: "elm/check/base/multicheck";