summaryrefslogtreecommitdiff
path: root/data/elementary/themes/edc/efl
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-03-21 00:05:02 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-03-21 00:05:02 +0000
commitb1426bf022ac280444d3b545eb558fcb5012abb7 (patch)
tree5474c3ff2768fe6386248cfaaa74670447a42239 /data/elementary/themes/edc/efl
parent4ed5ad6e35e2714739e8b0f941bb3998e6b07d45 (diff)
downloadefl-b1426bf022ac280444d3b545eb558fcb5012abb7.tar.gz
TH - efl radio
Diffstat (limited to 'data/elementary/themes/edc/efl')
-rw-r--r--data/elementary/themes/edc/efl/radio.edc381
1 files changed, 175 insertions, 206 deletions
diff --git a/data/elementary/themes/edc/efl/radio.edc b/data/elementary/themes/edc/efl/radio.edc
index 0efb52ca69..8f714d4c14 100644
--- a/data/elementary/themes/edc/efl/radio.edc
+++ b/data/elementary/themes/edc/efl/radio.edc
@@ -11,293 +11,262 @@ Group: efl/radio (@since 1.23)
Signal: efl,text,set
Signal: efl,text,unset
*/
-group { "efl/radio";
+group { name: "efl/radio";
data.item: "version" "123";
- images.image: "inset_shadow_circle_tiny.png" COMP;
- images.image: "inset_circle_tiny.png" COMP;
- images.image: "sym_radio_alum.png" COMP;
#define ICON 1
#define LABEL 2
#define MASK 3
#define DISABLE 4
+#define SELECTED 8
script {
- public btmode;
- public eval_mode(m) {
- new m1 = m & MASK;
- new d = m & DISABLE;
- if (m1 == (ICON | LABEL)) {
- if (!d) {
- set_state(PART:"efl.content", "visible", 0.0);
- set_state(PART:"sizer_content", "visible", 0.0);
- set_state(PART:"efl.text", "visible", 0.0);
- set_state(PART:"inset", "default", 0.0);
- set_state(PART:"clip", "default", 0.0);
- set_state(PART:"event", "default", 0.0);
- } else {
- set_state(PART:"efl.content", "visible", 0.0);
- set_state(PART:"sizer_content", "visible", 0.0);
- set_state(PART:"efl.text", "disabled_visible", 0.0);
- set_state(PART:"inset", "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:"efl.content", "visible", 0.0);
- set_state(PART:"sizer_content", "icononly", 0.0);
- set_state(PART:"efl.text", "default", 0.0);
- set_state(PART:"inset", "default", 0.0);
- set_state(PART:"clip", "default", 0.0);
- set_state(PART:"event", "default", 0.0);
- } else {
- set_state(PART:"efl.content", "visible", 0.0);
- set_state(PART:"sizer_content", "icononly", 0.0);
- set_state(PART:"efl.text", "disabled", 0.0);
- set_state(PART:"inset", "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:"efl.content", "default", 0.0);
- set_state(PART:"sizer_content", "default", 0.0);
- set_state(PART:"efl.text", "visible", 0.0);
- set_state(PART:"inset", "default", 0.0);
- set_state(PART:"clip", "default", 0.0);
- set_state(PART:"event", "default", 0.0);
- } else {
- set_state(PART:"efl.content", "default", 0.0);
- set_state(PART:"sizer_content", "default", 0.0);
- set_state(PART:"efl.text", "disabled_visible", 0.0);
- set_state(PART:"inset", "disabled", 0.0);
- set_state(PART:"clip", "disabled", 0.0);
- set_state(PART:"event", "disabled", 0.0);
- }
+ BUTTONMODE_SCRIPT2
+ public sel;
+ public eval_sel(m) {
+ if (m) {
+ set_state(PART:"ck_check", "selected", 0.0);
} else {
- if (!d) {
- set_state(PART:"efl.content", "default", 0.0);
- set_state(PART:"sizer_content", "default", 0.0);
- set_state(PART:"efl.text", "default", 0.0);
- set_state(PART:"inset", "default", 0.0);
- set_state(PART:"clip", "default", 0.0);
- set_state(PART:"event", "default", 0.0);
- } else {
- set_state(PART:"efl.content", "default", 0.0);
- set_state(PART:"sizer_content", "default", 0.0);
- set_state(PART:"efl.text", "default", 0.0);
- set_state(PART:"inset", "disabled", 0.0);
- set_state(PART:"clip", "disabled", 0.0);
- set_state(PART:"event", "disabled", 0.0);
- }
+ set_state(PART:"ck_check", "default", 0.0);
}
}
}
parts {
- part { name: "inset"; mouse_events: 0;
- scale: 1;
- description { state: "default" 0.0;
- rel1.offset: 2 2;
- rel2.relative: 0.0 1.0;
- rel2.offset: 2 -3;
- image.normal: "inset_shadow_circle_tiny.png";
- align: 0.0 0.5;
- min: 13 13;
- max: 13 13;
- fixed: 1 0;
+ part { name: "shadow"; type: SPACER;
+ description { state: "default";
}
- description { state: "disabled" 0.0;
- inherit: "default" 0.0;
- image.normal: "inset_circle_tiny.png";
+ desc { "pressed"; inherit;
+ }
+ desc { "disabled"; inherit;
}
}
- part { name: "indicator"; mouse_events: 0;
- scale: 1;
- clip_to: "clip";
- description { state: "default" 0.0;
- rel1.to: "inset";
- rel2.to: "inset";
- image.normal: "sym_radio_alum.png";
- min: 11 11;
- max: 11 11;
+ swallow { "efl.background"; nomouse;
+ desc { "default";
visible: 0;
}
- description { state: "selected" 0.0;
- inherit: "default" 0.0;
+ desc { "visible"; inherit;
visible: 1;
}
}
- part { name: "clip"; type: RECT;
- description { state: "default" 0.0;
+ rect { "icon_clip";
+ desc { "default";
+ color_class: "button_icon";
}
- description { state: "disabled" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 64;
+ desc { "pressed"; inherit;
+ color_class: "button_icon_pressed";
+ }
+ desc { "disabled"; inherit;
+ color_class: "button_icon_disabled";
}
}
- part { name: "efl.content"; type: SWALLOW;
+ swallow { "efl.content"; nomouse;
required;
+ clip_to: "icon_clip";
scale: 1;
- clip_to: "clip";
- description { state: "default" 0.0;
+ desc { "default";
fixed: 1 0;
- visible: 0;
align: 0.0 0.5;
- max: 0 0;
- rel1.to_x: "inset";
+ rel1.to_x: "base";
+ rel2.to_x: "base";
+ rel1.offset: 4 4;
rel1.relative: 1.0 0.0;
- rel1.offset: 1 1;
- rel2.to_x: "inset";
- rel2.offset: 1 -2;
- rel2.relative: 1.0 1.0;
+ rel2.relative: 0.0 1.0;
+ rel2.offset: 4 -5;
+ visible: 0;
+ offscale;
}
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
+ desc { "visible"; inherit;
+ fixed: 1 0;
aspect: 1.0 1.0;
- min: 16 16;
+ min: ICMIN ICMIN;
+ visible: 1;
+ }
+ desc { "icononly"; inherit;
+ fixed: 0 0;
+ align: 0.5 0.5;
+ rel2.relative: 1.0 1.0;
+ rel2.offset: -5 -5;
+ rel2.to_x: "";
+ visible: 1;
}
}
- part { name: "sizer_content"; type: TEXT; mouse_events: 0;
+ text { "sizer_content"; nomouse;
scale: 1;
- description { state: "default" 0.0;
- fixed: 1 1;
+ desc { "default";
visible: 0;
text { font: FN; size: 10;
min: 0 0;
- text_class: "radio_text";
+ text_class: "button_text";
}
}
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- rel1.to: "efl.content";
- rel2.to: "efl.content";
+ desc { "visible"; inherit;
+ rel.to: "efl.content";
text {
min: 1 1;
ellipsis: -1;
- text: "M";
+ text: SPACER_TEXT;
}
}
- description { state: "icononly" 0.0;
- inherit: "default" 0.0;
- rel1.to: "efl.content";
- rel2.to: "efl.content";
+ desc { "icononly"; inherit;
+ rel.to: "efl.content";
text {
min: 1 1;
ellipsis: -1;
- text: "M";
+ text: SPACER_TEXT;
}
}
}
- part { name: "efl.text"; type: TEXT; mouse_events: 0;
- effect: SHADOW BOTTOM;
+ part { name: "base"; type: RECT;
+ scale: 1;
+ description { state: "default";
+ align: 0.0 0.5;
+ min: 13 13;
+ max: 13 13;
+ rel1.offset: 4 4;
+ rel2.relative: 0.0 1.0;
+ rel2.offset: 4 -5;
+ aspect: 1.0 1.0; aspect_preference: VERTICAL;
+ offscale;
+ visible: 0;
+ offscale;
+ }
+ desc { "pressed"; inherit;
+ }
+ desc { "disabled"; inherit;
+ }
+ }
+ part { name: "ck_check";
scale: 1;
- required;
description { state: "default" 0.0;
- rel1.offset: 2 2;
- rel1.to_x: "efl.content";
+ fixed: 1 1;
+ rel.to: "base";
+ image.normal: "i-radio";
+ min: 15 15;
+ max: 15 15;
+ color: 0 0 0 64;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ color: 160 160 160 255;
+ }
+ desc { "disabled"; inherit;
+ color: 0 0 0 16;
+ }
+ }
+ text { "efl.text"; nomouse;
+ required;
+ scale: 1;
+ desc { "default";
+ fixed: 0 1;
+ color: 160 160 160 255;
+ rel1.offset: 0 4;
rel1.relative: 1.0 0.0;
- rel2.offset: -3 -3;
- color: FN_COL_DEFAULT;
- color_class: "radio_text";
+ rel1.to_x: "efl.content";
+ rel2.offset: -5 -5;
text { font: FN; size: 10;
- min: 0 0;
- align: 0.0 0.5;
- text_class: "radio";
+ align: 0.0 0.5;
+ min: 0 0;
}
+ visible: 0;
+ offscale;
}
- description { state: "disabled" 0.0;
- inherit: "default" 0.0;
- color_class: "radio_text_disabled";
- color3: 255 255 255 255;
+ desc { "visible"; inherit;
+ fixed: 0 0;
+ rel1.offset: 4 4;
+ text.min: 1 1;
+ text.ellipsis: -1;
+ visible: 1;
}
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
+ desc { "pressed_visible"; inherit;
+ fixed: 0 0;
+ color: 255 255 255 255;
+ rel1.offset: 4 4;
+ text.min: 1 1;
+ text.ellipsis: -1;
visible: 1;
+ }
+ desc { "textonly"; inherit;
+ fixed: 0 0;
text.min: 1 1;
text.ellipsis: -1;
+ visible: 1;
}
- description { state: "disabled_visible" 0.0;
- inherit: "default" 0.0;
- color_class: "radio_text_disabled";
- color3: 255 255 255 255;
+ desc { "pressed_textonly"; inherit;
+ fixed: 0 0;
+ color: 255 255 255 255;
+ text.min: 1 1;
+ text.ellipsis: -1;
visible: 1;
+ }
+ desc { "disabled_visible"; inherit;
+ fixed: 0 0;
+ color: 96 96 96 255;
+ rel1.offset: 4 4;
+ text.min: 1 1;
+ text.ellipsis: -1;
+ visible: 1;
+ }
+ desc { "disabled_textonly"; inherit;
+ fixed: 0 0;
+ color: 96 96 96 255;
text.min: 1 1;
text.ellipsis: -1;
+ visible: 1;
}
}
- part { name: "event"; type: RECT;
- description { state: "default" 0.0;
+ rect { "event";
+ ignore_flags: ON_HOLD;
+ desc { "default";
color: 0 0 0 0;
}
- description { state: "disabled" 0.0;
- inherit: "default" 0.0;
+ desc { "disabled"; inherit;
visible: 0;
}
}
}
programs {
EFL_UI_CLICKABLE_PART_BIND(event)
- program {
- signal: "efl,state,selected"; source: "efl";
- action: STATE_SET "selected" 0.0;
- target: "indicator";
- }
- program {
- signal: "efl,state,unselected"; source: "efl";
- action: STATE_SET "default" 0.0;
- target: "indicator";
- }
- program {
- signal: "efl,text,set"; source: "efl";
+ program { signal: "efl,state,selected"; source: "efl";
script {
- new m = get_int(btmode);
- m |= LABEL; set_int(btmode, m);
- eval_mode(m);
+ new m = get_int(sel) | SELECTED;
+ set_int(sel, m);
+ eval_sel(m);
}
}
- program {
- signal: "efl,text,unset"; source: "efl";
+ program { signal: "efl,state,unselected"; source: "efl";
script {
- new m = get_int(btmode);
- m &= ~LABEL; set_int(btmode, m);
- eval_mode(m);
+ new m = get_int(sel) & ~SELECTED;
+ set_int(sel, m);
+ eval_sel(m);
}
}
- program {
- signal: "efl,content,set"; source: "efl";
- script {
- new m = get_int(btmode);
- m |= ICON; set_int(btmode, m);
- eval_mode(m);
- }
+ program { signal: "efl,text,set"; source: "efl";
+ script { flag_set(LABEL); }
}
- program {
- signal: "efl,content,unset"; source: "efl";
- script {
- new m = get_int(btmode);
- m &= ~ICON; set_int(btmode, m);
- eval_mode(m);
- }
+ program { signal: "efl,text,unset"; source: "efl";
+ script { flag_unset(LABEL); }
}
- program {
- signal: "efl,state,disabled"; source: "efl";
- script {
- new m = get_int(btmode);
- m |= DISABLE; set_int(btmode, m);
- eval_mode(m);
- }
+ program { signal: "efl,content,set"; source: "efl";
+ script { flag_set(ICON); }
}
- program {
- signal: "efl,state,enabled"; source: "efl";
- script {
- new m = get_int(btmode);
- m &= ~DISABLE; set_int(btmode, m);
- eval_mode(m);
- }
+ program { signal: "efl,content,unset"; source: "efl";
+ script { flag_unset(ICON); }
+ }
+ program { signal: "efl,state,disabled"; source: "efl";
+ script { flag_set(DISABLE); }
+ }
+ program { signal: "efl,state,enabled"; source: "efl";
+ script { flag_unset(DISABLE); }
+ }
+ program { signal: "efl,state,disabled"; source: "efl";
+ action: STATE_SET "disabled" 0.0;
+ target: "ck_check";
+ }
+ program { signal: "efl,state,enabled"; source: "efl";
+ action: STATE_SET "default" 0.0;
+ target: "ck_check";
}
}
-#undef ICON
-#undef LABEL
-#undef MASK
-#undef DISABLE
}