forked from enlightenment/efl
251 lines
8.0 KiB
Plaintext
251 lines
8.0 KiB
Plaintext
|
group { name: "elm/check/base/default";
|
||
|
images {
|
||
|
image: "check_base.png" COMP;
|
||
|
image: "check.png" COMP;
|
||
|
image: "check2.png" COMP;
|
||
|
}
|
||
|
parts {
|
||
|
part { name: "bg";
|
||
|
mouse_events: 0;
|
||
|
scale: 1;
|
||
|
description { state: "default" 0.0;
|
||
|
rel1.offset: 1 1;
|
||
|
rel2.relative: 0.0 1.0;
|
||
|
rel2.offset: 1 -2;
|
||
|
align: 0.0 0.5;
|
||
|
min: 16 16;
|
||
|
max: 16 16;
|
||
|
aspect: 1.0 1.0;
|
||
|
aspect_preference: VERTICAL;
|
||
|
image {
|
||
|
normal: "check_base.png";
|
||
|
border: 5 5 5 5;
|
||
|
middle: 0;
|
||
|
}
|
||
|
fill.smooth : 0;
|
||
|
}
|
||
|
}
|
||
|
part { name: "check";
|
||
|
mouse_events: 0;
|
||
|
scale: 1;
|
||
|
description { state: "default" 0.0;
|
||
|
rel1 {
|
||
|
to: "bg";
|
||
|
offset: 1 1;
|
||
|
}
|
||
|
rel2 {
|
||
|
to: "bg";
|
||
|
offset: -2 -2;
|
||
|
}
|
||
|
visible: 0;
|
||
|
color: 255 255 255 255;
|
||
|
image.normal: "check.png";
|
||
|
}
|
||
|
description { state: "visible" 0.0;
|
||
|
inherit: "default" 0.0;
|
||
|
visible: 1;
|
||
|
}
|
||
|
description { state: "disabled" 0.0;
|
||
|
inherit: "default" 0.0;
|
||
|
visible: 0;
|
||
|
color: 128 128 128 128;
|
||
|
}
|
||
|
description { state: "disabled_visible" 0.0;
|
||
|
inherit: "default" 0.0;
|
||
|
color: 128 128 128 128;
|
||
|
visible: 1;
|
||
|
}
|
||
|
}
|
||
|
part { name: "elm.swallow.content";
|
||
|
type: SWALLOW;
|
||
|
description { state: "default" 0.0;
|
||
|
fixed: 1 0;
|
||
|
visible: 0;
|
||
|
align: 0.0 0.5;
|
||
|
rel1.to_x: "bg";
|
||
|
rel1.relative: 1.0 0.0;
|
||
|
rel1.offset: 1 1;
|
||
|
rel2.to_x: "bg";
|
||
|
rel2.offset: 1 -2;
|
||
|
rel2.relative: 1.0 1.0;
|
||
|
}
|
||
|
description { state: "visible" 0.0;
|
||
|
inherit: "default" 0.0;
|
||
|
fixed: 1 0;
|
||
|
visible: 1;
|
||
|
aspect: 1.0 1.0;
|
||
|
}
|
||
|
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 0;
|
||
|
visible: 1;
|
||
|
aspect: 1.0 1.0;
|
||
|
}
|
||
|
}
|
||
|
part { name: "elm.text";
|
||
|
type: TEXT;
|
||
|
mouse_events: 0;
|
||
|
scale: 1;
|
||
|
description { state: "default" 0.0;
|
||
|
visible: 0;
|
||
|
rel1.to_x: "elm.swallow.content";
|
||
|
rel1.relative: 1.0 0.0;
|
||
|
rel1.offset: 1 1;
|
||
|
rel2.relative: 1.0 1.0;
|
||
|
rel2.offset: -2 -2;
|
||
|
color: 0 0 0 255;
|
||
|
text {
|
||
|
font: "Sans,Edje-Vera";
|
||
|
size: 10;
|
||
|
min: 0 1;
|
||
|
align: -1.0 0.5;
|
||
|
}
|
||
|
}
|
||
|
description { state: "visible" 0.0;
|
||
|
inherit: "default" 0.0;
|
||
|
visible: 1;
|
||
|
text.min: 1 1;
|
||
|
}
|
||
|
description { state: "disabled" 0.0;
|
||
|
inherit: "default" 0.0;
|
||
|
color: 0 0 0 128;
|
||
|
color3: 0 0 0 0;
|
||
|
}
|
||
|
description { state: "disabled_visible" 0.0;
|
||
|
inherit: "default" 0.0;
|
||
|
color: 0 0 0 128;
|
||
|
color3: 0 0 0 0;
|
||
|
visible: 1;
|
||
|
text.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";
|
||
|
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,up,1";
|
||
|
source: "events";
|
||
|
action: SIGNAL_EMIT "elm,action,check,toggle" "";
|
||
|
}
|
||
|
program { name: "check_on";
|
||
|
signal: "elm,state,check,on";
|
||
|
source: "elm";
|
||
|
action: STATE_SET "visible" 0.0;
|
||
|
target: "check";
|
||
|
}
|
||
|
program { name: "check_off";
|
||
|
signal: "elm,state,check,off";
|
||
|
source: "elm";
|
||
|
action: STATE_SET "default" 0.0;
|
||
|
target: "check";
|
||
|
}
|
||
|
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";
|
||
|
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);
|
||
|
else
|
||
|
set_state(PART:"check", "disabled", 0.0);
|
||
|
}
|
||
|
}
|
||
|
program { name: "enable";
|
||
|
signal: "elm,state,enabled";
|
||
|
source: "elm";
|
||
|
action: STATE_SET "default" 0.0;
|
||
|
target: "disabler";
|
||
|
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, "visible"))
|
||
|
set_state(PART:"check", "visible", 0.0);
|
||
|
else
|
||
|
set_state(PART:"check", "default", 0.0);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
///////////////////////////////////////////////////////////////////////////////
|