aboutsummaryrefslogtreecommitdiffstats
path: root/data/themes/edc/elm/check.edc
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-10-17 16:34:36 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-10-17 16:35:56 +0900
commit6a52628d12002c0a0f6c66bcfe2c10fc227b9dce (patch)
tree8a5aac3ede258bd0b621c395718f19ef95697e6b /data/themes/edc/elm/check.edc
parentelm_calendar: Reorder few members of _Elm_Calendar_Smart_Data to reduce size (diff)
downloadelementary-6a52628d12002c0a0f6c66bcfe2c10fc227b9dce.tar.gz
new theme (dark) is now default in elm. matches e now in look
Diffstat (limited to 'data/themes/edc/elm/check.edc')
-rw-r--r--data/themes/edc/elm/check.edc891
1 files changed, 891 insertions, 0 deletions
diff --git a/data/themes/edc/elm/check.edc b/data/themes/edc/elm/check.edc
new file mode 100644
index 000000000..404b05b26
--- /dev/null
+++ b/data/themes/edc/elm/check.edc
@@ -0,0 +1,891 @@
+group { name: "elm/check/base/default";
+ images.image: "inset_shadow_tiny.png" COMP;
+ images.image: "bevel_in.png" COMP;
+ images.image: "sym_check_alum.png" COMP;
+#define ICON 1
+#define LABEL 2
+#define MASK 3
+#define DISABLE 4
+ script {
+ public btmode;
+ public eval_mode(m) {
+ new m1 = m & MASK;
+ new d = m & DISABLE;
+ if (m1 == (ICON | LABEL)) {
+ if (!d) {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"sizer.content", "visible", 0.0);
+ set_state(PART:"elm.text", "visible", 0.0);
+ set_state(PART:"shadow", "default", 0.0);
+ set_state(PART:"base", "default", 0.0);
+ set_state(PART:"clip", "default", 0.0);
+ set_state(PART:"event", "default", 0.0);
+ } else {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"sizer.content", "visible", 0.0);
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ set_state(PART:"shadow", "disabled", 0.0);
+ set_state(PART:"base", "disabled", 0.0);
+ set_state(PART:"clip", "disabled", 0.0);
+ set_state(PART:"event", "disabled", 0.0);
+ }
+ } else if (m1 == (ICON)) {
+ if (!d) {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"sizer.content", "icononly", 0.0);
+ set_state(PART:"elm.text", "default", 0.0);
+ set_state(PART:"shadow", "default", 0.0);
+ set_state(PART:"base", "default", 0.0);
+ set_state(PART:"clip", "default", 0.0);
+ set_state(PART:"event", "default", 0.0);
+ } else {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"sizer.content", "icononly", 0.0);
+ set_state(PART:"elm.text", "disabled", 0.0);
+ set_state(PART:"shadow", "disabled", 0.0);
+ set_state(PART:"base", "disabled", 0.0);
+ set_state(PART:"clip", "disabled", 0.0);
+ set_state(PART:"event", "disabled", 0.0);
+ }
+ } else if (m1 == (LABEL)) {
+ if (!d) {
+ set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"sizer.content", "default", 0.0);
+ set_state(PART:"elm.text", "visible", 0.0);
+ set_state(PART:"shadow", "default", 0.0);
+ set_state(PART:"base", "default", 0.0);
+ set_state(PART:"clip", "default", 0.0);
+ set_state(PART:"event", "default", 0.0);
+ } else {
+ set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"sizer.content", "default", 0.0);
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ set_state(PART:"shadow", "disabled", 0.0);
+ set_state(PART:"base", "disabled", 0.0);
+ set_state(PART:"clip", "disabled", 0.0);
+ set_state(PART:"event", "disabled", 0.0);
+ }
+ }
+ }
+ }
+ parts {
+ part { name: "base"; type: RECT;
+ description { state: "default" 0.0;
+ rel1.offset: 1 1;
+ rel1.to: "inset";
+ rel2.offset: -2 -2;
+ rel2.to: "inset";
+ color: 24 24 24 255;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 64 64 64 255;
+ }
+ }
+ part { name: "shadow"; mouse_events: 0;
+ description { state: "default" 0.0;
+ image.normal: "inset_shadow_tiny.png";
+ image.border: 4 4 4 4;
+ rel1.to: "base";
+ rel2.to: "base";
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "inset"; mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ rel1.offset: 2 2;
+ rel2.relative: 0.0 1.0;
+ rel2.offset: 2 -3;
+ align: 0.0 0.5;
+ min: 13 13;
+ max: 13 13;
+ image.normal: "bevel_in.png";
+ image.border: 1 1 1 1;
+ image.middle: 0;
+ fill.smooth: 0;
+ }
+ }
+ part { name: "indicator"; mouse_events: 0;
+ scale: 1;
+ clip_to: "clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "base";
+ rel2.to: "base";
+ image.normal: "sym_check_alum.png";
+ min: 11 11;
+ max: 11 11;
+ visible: 0;
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "clip"; type: RECT;
+ description { state: "default" 0.0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 64;
+ }
+ }
+ part { name: "elm.swallow.content"; type: SWALLOW;
+ scale: 1;
+ clip_to: "clip";
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ visible: 0;
+ align: 0.0 0.5;
+ max: 0 0;
+ rel1.to_x: "inset";
+ rel1.relative: 1.0 0.0;
+ rel1.offset: 1 1;
+ rel2.to_x: "inset";
+ rel2.offset: 1 -2;
+ rel2.relative: 1.0 1.0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ fixed: 0 0;
+ visible: 1;
+ aspect: 1.0 1.0;
+ min: 16 16;
+ }
+ }
+ part { name: "sizer.content"; type: TEXT; mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ visible: 0;
+ text { font: FN; size: 10;
+ min: 0 0;
+ text_class: "check_text";
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
+ text {
+ min: 1 1;
+ text: "M";
+ }
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
+ text {
+ min: 1 1;
+ text: "M";
+ }
+ }
+ }
+ part { name: "elm.text"; type: TEXT; mouse_events: 0;
+ effect: SHADOW BOTTOM;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.offset: 2 2;
+ rel1.to_x: "elm.swallow.content";
+ rel1.relative: 1.0 0.0;
+ rel2.offset: -3 -3;
+ color: 255 255 255 255;
+ color3: 0 0 0 128;
+ color_class: "check_text";
+ text { font: FN; size: 10;
+ min: 0 0;
+ align: 0.0 0.5;
+ text_class: "check";
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 21 21 21 255;
+ color3: 255 255 255 25;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ text.min: 1 1;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ color: 21 21 21 255;
+ color3: 255 255 255 25;
+ visible: 1;
+ text.min: 1 1;
+ }
+ }
+ part { name: "event"; type: RECT;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ }
+ programs {
+ program {
+ signal: "mouse,clicked,1"; source: "event";
+ action: SIGNAL_EMIT "elm,action,check,toggle" "elm";
+ }
+ program {
+ signal: "elm,state,check,on"; source: "elm";
+ action: STATE_SET "selected" 0.0;
+ target: "indicator";
+ }
+ program {
+ signal: "elm,state,check,off"; source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "indicator";
+ }
+ program {
+ signal: "elm,state,text,visible"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m |= LABEL; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ program {
+ signal: "elm,state,text,hidden"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m &= ~LABEL; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ program {
+ signal: "elm,state,icon,visible"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m |= ICON; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ program {
+ signal: "elm,state,icon,hidden"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m &= ~ICON; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ program {
+ signal: "elm,state,disabled"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m |= DISABLE; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ program {
+ signal: "elm,state,enabled"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m &= ~DISABLE; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ }
+#undef ICON
+#undef LABEL
+#undef MASK
+#undef DISABLE
+}
+
+group { name: "elm/check/base/toggle";
+ images.image: "inset_shadow_tiny.png" COMP;
+ images.image: "bevel_in.png" COMP;
+ images.image: "bevel_out.png" COMP;
+ images.image: "vgrad_med_lighter.png" COMP;
+ images.image: "shadow_square_tiny.png" COMP;
+ images.image: "glow_small.png" COMP;
+
+#define ICON 1
+#define LABEL 2
+#define MASK 3
+#define DISABLE 4
+ script {
+ public is_rtl;
+ public is_drag;
+ public was_drag;
+
+ public btmode;
+ public eval_mode(m) {
+ new m1 = m & MASK;
+ new d = m & DISABLE;
+ if (m1 == (ICON | LABEL)) {
+ if (!d) {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"sizer.content", "visible", 0.0);
+ set_state(PART:"elm.text", "visible", 0.0);
+ set_state(PART:"shadow", "default", 0.0);
+ set_state(PART:"clip", "default", 0.0);
+ set_state(PART:"event", "default", 0.0);
+ set_state(PART:"event2", "default", 0.0);
+ set_state(PART:"elm.ontext", "default", 0.0);
+ set_state(PART:"elm.offtext", "default", 0.0);
+ set_state(PART:"onrect", "default", 0.0);
+ set_state(PART:"offrect", "default", 0.0);
+ } else {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"sizer.content", "visible", 0.0);
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ set_state(PART:"shadow", "disabled", 0.0);
+ set_state(PART:"clip", "disabled", 0.0);
+ set_state(PART:"event", "disabled", 0.0);
+ set_state(PART:"event2", "disabled", 0.0);
+ set_state(PART:"elm.ontext", "disabled", 0.0);
+ set_state(PART:"elm.offtext", "disabled", 0.0);
+ set_state(PART:"onrect", "disabled", 0.0);
+ set_state(PART:"offrect", "disabled", 0.0);
+ }
+ } else if (m1 == (ICON)) {
+ if (!d) {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"sizer.content", "icononly", 0.0);
+ set_state(PART:"elm.text", "default", 0.0);
+ set_state(PART:"shadow", "default", 0.0);
+ set_state(PART:"clip", "default", 0.0);
+ set_state(PART:"event", "default", 0.0);
+ set_state(PART:"event2", "default", 0.0);
+ set_state(PART:"elm.ontext", "default", 0.0);
+ set_state(PART:"elm.offtext", "default", 0.0);
+ set_state(PART:"onrect", "default", 0.0);
+ set_state(PART:"offrect", "default", 0.0);
+ } else {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"sizer.content", "icononly", 0.0);
+ set_state(PART:"elm.text", "disabled", 0.0);
+ set_state(PART:"shadow", "disabled", 0.0);
+ set_state(PART:"clip", "disabled", 0.0);
+ set_state(PART:"event", "disabled", 0.0);
+ set_state(PART:"event2", "disabled", 0.0);
+ set_state(PART:"elm.ontext", "disabled", 0.0);
+ set_state(PART:"elm.offtext", "disabled", 0.0);
+ set_state(PART:"onrect", "disabled", 0.0);
+ set_state(PART:"offrect", "disabled", 0.0);
+ }
+ } else if (m1 == (LABEL)) {
+ if (!d) {
+ set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"sizer.content", "default", 0.0);
+ set_state(PART:"elm.text", "visible", 0.0);
+ set_state(PART:"shadow", "default", 0.0);
+ set_state(PART:"clip", "default", 0.0);
+ set_state(PART:"event", "default", 0.0);
+ set_state(PART:"event2", "default", 0.0);
+ set_state(PART:"elm.ontext", "default", 0.0);
+ set_state(PART:"elm.offtext", "default", 0.0);
+ set_state(PART:"onrect", "default", 0.0);
+ set_state(PART:"offrect", "default", 0.0);
+ } else {
+ set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"sizer.content", "default", 0.0);
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ set_state(PART:"shadow", "disabled", 0.0);
+ set_state(PART:"clip", "disabled", 0.0);
+ set_state(PART:"event", "disabled", 0.0);
+ set_state(PART:"event2", "disabled", 0.0);
+ set_state(PART:"elm.ontext", "disabled", 0.0);
+ set_state(PART:"elm.offtext", "disabled", 0.0);
+ set_state(PART:"onrect", "disabled", 0.0);
+ set_state(PART:"offrect", "disabled", 0.0);
+ }
+ }
+ }
+ }
+ parts {
+ part { name: "tog"; type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ rel1.relative: 1.0 0.0;
+ rel1.offset: 2 2;
+ rel2.offset: -3 -3;
+ align: 1.0 0.5;
+ min: 88 15;
+ max: 88 15;
+ }
+ }
+ part { name: "onrect"; type: RECT; mouse_events: 0;
+ scale: 1;
+ clip_to: "tog_clip";
+ description { state: "default" 0.0;
+ rel1.to: "button";
+ rel1.relative: -5.0 0.0;
+ rel2.to: "button";
+ rel2.relative: 0.5 1.0;
+ color: 24 24 24 255;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 64 64 64 255;
+ }
+ }
+ part { name: "offrect"; type: RECT; mouse_events: 0;
+ scale: 1;
+ clip_to: "tog_clip";
+ description { state: "default" 0.0;
+ rel1.to: "button";
+ rel1.relative: 0.5 0.0;
+ rel2.to: "button";
+ rel2.relative: 6.0 1.0;
+ color: 24 24 24 255;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 64 64 64 255;
+ }
+ }
+ part { name: "elm.offtext"; type: TEXT; mouse_events: 0;
+ effect: SHADOW BOTTOM;
+ scale: 1;
+ clip_to: "tog_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "button";
+ rel1.relative: 1.0 0.0;
+ rel2.to: "offrect";
+ color: 255 255 255 255;
+ color3: 0 0 0 128;
+ color_class: "check_off_text";
+ text { font: FN; size: 10;
+ min: 0 1;
+ align: 0.5 0.5;
+ text_class: "check_off_text";
+ text: "OFF";
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 21 21 21 255;
+ color3: 255 255 255 25;
+ }
+ }
+ part { name: "elm.ontext"; type: TEXT; mouse_events: 0;
+ effect: GLOW;
+ scale: 1;
+ clip_to: "tog_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "onrect";
+ rel1.offset: 2 -1;
+ rel2.to: "button";
+ rel2.relative: 0.0 1.0;
+ rel2.offset: -1 -2;
+ color: 51 153 255 255;
+ color2: 51 153 255 24;
+ color3: 51 153 255 18;
+ color_class: "check_on_text";
+ text { font: FN; size: 10;
+ min: 0 1;
+ align: 0.5 0.5;
+ text_class: "check_on_text";
+ text: "ON";
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 51 153 255 64;
+ color2: 51 153 255 16;
+ color3: 51 153 255 8;
+ }
+ }
+ part { name: "shadow"; mouse_events: 0;
+ description { state: "default" 0.0;
+ image.normal: "inset_shadow_tiny.png";
+ image.border: 4 4 4 4;
+ rel1.to: "tog";
+ rel2.to: "tog";
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "inset"; mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "tog";
+ rel1.offset: -1 -1;
+ rel2.to: "tog";
+ rel2.offset: 0 0;
+ image.normal: "bevel_in.png";
+ image.border: 1 1 1 1;
+ image.middle: 0;
+ fill.smooth: 0;
+ }
+ }
+ part { name: "tog_clip"; type: RECT;
+ description { state: "default" 0.0;
+ rel1.to: "tog";
+ rel2.to: "tog";
+ }
+ }
+ part { name: "button"; type: RECT;
+ scale: 1;
+ clip_to: "tog_clip";
+ dragable {
+ x: 1 1 0;
+ y: 0 0 0;
+ confine: "tog";
+ }
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "tog";
+ rel2.to: "tog";
+ min: 15 15;
+ max: 15 99999;
+ color: 255 128 0 128;
+ }
+ }
+ part { name: "shadow_but"; mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.offset: -3 -2;
+ rel1.to: "base_but";
+ rel2.offset: 2 4;
+ rel2.to: "base_but";
+ image.normal: "shadow_square_tiny.png";
+ image.border: 6 6 6 6;
+ fill.smooth: 0;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ rel1.offset: -2 -2;
+ rel2.offset: 1 1;
+ color: 255 255 255 128;
+ }
+ }
+ part { name: "glow_but"; mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.offset: -3 -3;
+ rel1.to: "base_but";
+ rel2.offset: 2 2;
+ rel2.to: "base_but";
+ image.normal: "glow_small.png";
+ image.border: 7 7 7 7;
+ fill.smooth: 0;
+ visible: 0;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "base_but"; mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "button";
+ rel2.to: "button";
+ image.normal: "vgrad_med_lighter.png";
+ fill.smooth: 0;
+ TILED_HORIZ(120)
+ }
+ }
+ part { name: "bevel_but"; mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "base_but";
+ rel2.to: "base_but";
+ image.normal: "bevel_out.png";
+ image.border: 1 1 1 1;
+ image.middle: 0;
+ fill.smooth: 0;
+ }
+ }
+ part { name: "button_events"; type: RECT;
+ dragable.events: "button";
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "clip"; type: RECT;
+ description { state: "default" 0.0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 64;
+ }
+ }
+ part { name: "elm.swallow.content"; type: SWALLOW;
+ scale: 1;
+ clip_to: "clip";
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ visible: 0;
+ align: 0.0 0.5;
+ max: 0 0;
+ rel1.offset: 1 1;
+ rel2.offset: 1 -2;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ fixed: 0 0;
+ visible: 1;
+ aspect: 1.0 1.0; aspect_preference: VERTICAL;
+ min: 16 16;
+ }
+ }
+ part { name: "sizer.content"; type: TEXT; mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ visible: 0;
+ text { font: FN; size: 10;
+ min: 0 0;
+ text_class: "check_text";
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
+ text {
+ min: 1 1;
+ text: "M";
+ }
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
+ text {
+ min: 1 1;
+ text: "M";
+ }
+ }
+ }
+ part { name: "elm.text"; type: TEXT; mouse_events: 0;
+ effect: SHADOW BOTTOM;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to_x: "elm.swallow.content";
+ rel1.relative: 1.0 0.0;
+ rel1.offset: 2 2;
+ rel2.to_x: "tog";
+ rel2.relative: 0.0 1.0;
+ rel2.offset: -5 -3;
+ color: 255 255 255 255;
+ color3: 0 0 0 128;
+ color_class: "check_text";
+ text { font: FN; size: 10;
+ min: 0 0;
+ align: 0.0 0.5;
+ text_class: "check";
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 21 21 21 255;
+ color3: 255 255 255 25;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ text.min: 1 1;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ color: 21 21 21 255;
+ color3: 255 255 255 25;
+ visible: 1;
+ text.min: 1 1;
+ }
+ }
+ part { name: "event"; type: RECT;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ rel1.to_x: "elm.swallow.content";
+ rel2.to_x: "elm.text";
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "event2"; type: RECT;
+ ignore_flags: ON_HOLD;
+ 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 {
+ signal: "mouse,clicked,1"; source: "event";
+ action: SIGNAL_EMIT "elm,action,check,toggle" "elm";
+ }
+ program {
+ signal: "elm,state,check,on"; source: "elm";
+ script {
+ new Float:drag;
+ if (get_int(is_rtl) == 0) {
+ drag = 100.0;
+ } else {
+ drag = 0.0;
+ }
+ set_drag(PART:"button", drag, 0.0);
+ }
+ }
+ program {
+ signal: "elm,state,check,off"; source: "elm";
+ script {
+ new Float:drag;
+ if (get_int(is_rtl) == 0) {
+ drag = 0.0;
+ } else {
+ drag = 100.0;
+ }
+ set_drag(PART:"button", drag, 0.0);
+ }
+ }
+ program {
+ signal: "mouse,clicked,1"; source: "button";
+ script {
+ new Float:dx, Float:dy;
+ get_drag(PART:"button", dx, dy);
+ if (!get_int(was_drag)) {
+ if (dx > 0.5) {
+ set_drag(PART:"button", 0.0, 0.0);
+ } else {
+ set_drag(PART:"button", 1.0, 0.0);
+ }
+ if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
+ (get_int(is_rtl) == 0) && (dx > 0.5)) {
+ emit("elm,action,check,off", "");
+ } else {
+ emit("elm,action,check,on", "");
+ }
+ }
+ }
+ }
+ program {
+ signal: "drag"; source: "button";
+ script {
+ set_int(is_drag, 1);
+ }
+ }
+ program {
+ signal: "mouse,down,1"; source: "button";
+ script {
+ set_int(was_drag, 0);
+ set_int(is_drag, 0);
+ }
+ }
+ program { name: "drag_end";
+ signal: "mouse,up,1"; source: "button";
+ script {
+ new Float:dx, Float:dy;
+ get_drag(PART:"button", dx, dy);
+ if (get_int(is_drag)) {
+ if (dx > 0.5) {
+ set_drag(PART:"button", 1.0, 0.0);
+ } else {
+ set_drag(PART:"button", 0.0, 0.0);
+ }
+ if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
+ (get_int(is_rtl) == 0) && (dx > 0.5)) {
+ emit("elm,action,check,on", "");
+ } else {
+ emit("elm,action,check,off", "");
+ }
+ set_int(was_drag, 1);
+ set_int(is_drag, 0);
+ }
+ }
+ }
+ program {
+ signal: "mouse,down,1"; source: "button";
+ action: STATE_SET "clicked" 0.0;
+ target: "shadow_but";
+ target: "glow_but";
+ }
+ program {
+ signal: "mouse,up,1"; source: "button";
+ action: STATE_SET "default" 0.0;
+ target: "shadow_but";
+ target: "glow_but";
+ }
+ program {
+ signal: "elm,state,text,visible"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m |= LABEL; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ program {
+ signal: "elm,state,text,hidden"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m &= ~LABEL; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ program {
+ signal: "elm,state,icon,visible"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m |= ICON; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ program {
+ signal: "elm,state,icon,hidden"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m &= ~ICON; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ program {
+ signal: "elm,state,disabled"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m |= DISABLE; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ program {
+ signal: "elm,state,enabled"; source: "elm";
+ script {
+ new m = get_int(btmode);
+ m &= ~DISABLE; set_int(btmode, m);
+ eval_mode(m);
+ }
+ }
+ program {
+ signal: "edje,state,rtl"; source: "edje";
+ script {
+ set_int(is_rtl, 1);
+ }
+ }
+ program {
+ signal: "edje,state,ltr"; source: "edje";
+ script {
+ set_int(is_rtl, 0);
+ }
+ }
+ }
+#undef ICON
+#undef LABEL
+#undef MASK
+#undef DISABLE
+}