summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprince <prince.dubey@samsung.com>2013-07-03 15:45:04 +0530
committerSungho Kwak <sungho1.kwak@samsung.com>2013-07-08 15:52:49 +0900
commit8bb6811810dba6f8b36895678744929624392250 (patch)
tree227aa22df36a9dd786af68a602c2dd47fbb1cb65
parent89e55a4b1973869831087b833da28d7ad5ac373f (diff)
downloadefl-theme-tizen-8bb6811810dba6f8b36895678744929624392250.tar.gz
efl-theme-tizen-8bb6811810dba6f8b36895678744929624392250.tar.bz2
efl-theme-tizen-8bb6811810dba6f8b36895678744929624392250.zip
[Check (Gengrid)] Refactoring of grid style of check. Added signal elm,state,set,visible/hidden.
Change-Id: I8eb2e3041b2efa60193f81ca933e693917c4b5e1
-rw-r--r--themes/widgets/check.edc179
1 files changed, 30 insertions, 149 deletions
diff --git a/themes/widgets/check.edc b/themes/widgets/check.edc
index acc9a130..bf140d9d 100644
--- a/themes/widgets/check.edc
+++ b/themes/widgets/check.edc
@@ -2035,6 +2035,7 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
+ visible: 0;
min: GENGRID_EDIT_MODE_CHECK_SIZE_INC;
align: 0.0 0.0;
fixed: 1 1;
@@ -2050,13 +2051,14 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
+ visible: 1;
}
description { state: "pressed" 0.0;
- inherit: "default" 0.0;
+ inherit: "visible" 0.0;
image.normal: "00_check_press_bg.png";
}
description { state: "disabled" 0.0;
- inherit: "default" 0.0;
+ inherit: "visible" 0.0;
image.normal: "00_check_dim_bg.png";
}
}
@@ -2100,89 +2102,16 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i
rel2.relative: 1.0 1.0;
}
}
- 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: "bg2";
- relative: 1.0 0.0;
- offset: 1 1;
- }
- rel2 {
- to_x: "bg2";
- relative: 1.0 1.0;
- 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;
+ part { name: "events";
+ type: RECT;
+ ignore_flags: ON_HOLD;
description { state: "default" 0.0;
+ color: 0 0 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;
- }
- color: 255 255 255 255;
- align: 0.0 0.5;
- text {
- style: "check_label_textblock_style";
- min: 0 0;
- }
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
- text.min: 1 1;
- }
- description { state: "disabled" 0.0;
- inherit: "default" 0.0;
- }
- description { state: "disabled_visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- text {
- style: "check_label_textblock_style_disable";
- min: 1 1;
- }
- }
- }
- part { name: "events";
- type: RECT;
- ignore_flags: ON_HOLD;
- description { state: "default" 0.0;
- color: 0 0 0 0;
}
}
part { name: "disabler";
@@ -2199,47 +2128,42 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i
}
programs {
program { name: "show";
- signal: "show";
+ signal: "elm,state,set,visible";
+ source: "elm";
script {
set_int(check_visible, CHECK_SHOW);
}
+ action: STATE_SET "visible" 0.0;
+ target: "bg2";
+ target: "events";
}
program { name: "hide";
- signal: "hide";
+ signal: "elm,state,set,hidden";
+ source: "elm";
script {
set_int(check_visible, CHECK_HIDE);
}
+ action: STATE_SET "default" 0.0;
+ target: "check";
+ target: "bg2";
+ target: "events";
}
program { name: "click";
signal: "mouse,clicked,1";
source: "events";
action: SIGNAL_EMIT "elm,action,check,toggle" "";
- after: "bg_normal";
- }
- program { name: "bg_normal";
- script {
- set_state(PART:"bg2", "default", 0.0);
- }
}
program { name: "unpress";
signal: "mouse,up,1";
source: "events";
- action: STATE_SET "default" 0.0;
+ action: STATE_SET "visible" 0.0;
target: "bg2";
}
program { name: "pressed";
signal: "mouse,down,1";
source: "events";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"check", st, 30, vl);
- if (!strcmp(st, "visible"))
- {
- set_state(PART:"check", "pressed", 0.0);
- }
- set_state(PART:"bg2", "pressed", 0.0);
- }
+ action: STATE_SET "pressed" 0.0;
+ target: "bg2";
}
program { name: "mouse,out";
signal: "mouse,out";
@@ -2249,20 +2173,20 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i
{
set_state(PART:"check", "visible", 0.0);
set_state(PART:"sequence_clip", "visible", 0.0);
- set_state(PART:"bg2", "visible", 0.0);
}
else
{
set_state(PART:"check", "default", 0.0);
set_state(PART:"sequence_clip", "default", 0.0);
- set_state(PART:"bg2", "default", 0.0);
}
+ set_state(PART:"bg2", "visible", 0.0);
}
}
program { name: "check_on";
signal: "elm,state,check,on";
source: "elm";
script {
+ if (get_int(check_state) != CHECK_STATE_VISIBLE) {
set_int(check_state, CHECK_STATE_VISIBLE);
if (get_int(check_visible) == CHECK_SHOW)
{
@@ -2275,6 +2199,7 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i
set_state(PART:"sequence_clip", "visible", 0.0);
}
set_state(PART:"bg2", "visible", 0.0);
+ }
}
}
program { name: "check_off";
@@ -2289,7 +2214,7 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i
set_state(PART:"check", "default", 0.0);
set_state(PART:"sequence_clip", "default", 0.0);
}
- set_state(PART:"bg2", "default", 0.0);
+ set_state(PART:"bg2", "visible", 0.0);
}
}
program { name: "check_show_effect";
@@ -2302,52 +2227,18 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i
transition: LINEAR 0.267;
target: "sequence_clip";
}
- 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: "bg2";
- after: "disable_text";
+ after: "disable_check";
}
- program { name: "disable_text";
+ program { name: "disable_check";
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"))
{
@@ -2362,22 +2253,12 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i
action: STATE_SET "default" 0.0;
target: "disabler";
target: "bg2";
- after: "enable_text";
+ after: "enable_check";
}
- program { name: "enable_text";
+ program { name: "enable_check";
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"))
{