summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2017-11-11 20:12:56 +0100
committerBoris Faure <billiob@gmail.com>2017-11-11 20:12:56 +0100
commitbb968b968e48813f750cc74711eb8572e5446800 (patch)
treec6f3748458fa3001ad5f4b88b02ab4723c55b14f /data
parent2a78d2fdcd6f3704411cae26583c2fa1768feb6b (diff)
be able to configure shine level on the default theme
Was asked about it too many times, so here it is :)
Diffstat (limited to 'data')
-rw-r--r--data/themes/default.edc102
1 files changed, 79 insertions, 23 deletions
diff --git a/data/themes/default.edc b/data/themes/default.edc
index 113ecda..c794f28 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -142,16 +142,18 @@ collections {
142 group { name: "terminology/core"; 142 group { name: "terminology/core";
143 script { 143 script {
144 public message(Msg_Type:type, id, ...) { 144 public message(Msg_Type:type, id, ...) {
145 new r, g, b, a, v;
146
147 if ((type != MSG_INT) || (id != 1)) return;
148 145
149 v = (getarg(2) * 255) / 100; 146 if (type != MSG_INT)
147 return;
148 if (id == 1) { // fade
149 new r, g, b, a, v;
150 v = (getarg(2) * 255) / 100;
150 151
151 custom_state(PART:"fade", "default", 0.0); 152 custom_state(PART:"fade", "default", 0.0);
152 get_state_val(PART:"fade", STATE_COLOR, r, g, b, a); 153 get_state_val(PART:"fade", STATE_COLOR, r, g, b, a);
153 set_state_val(PART:"fade", STATE_COLOR, r, g, b, v); 154 set_state_val(PART:"fade", STATE_COLOR, r, g, b, v);
154 set_state(PART:"fade", "custom", 0.0); 155 set_state(PART:"fade", "custom", 0.0);
156 }
155 } 157 }
156 } 158 }
157 parts { 159 parts {
@@ -279,19 +281,33 @@ collections {
279 public message(Msg_Type:type, id, ...) { 281 public message(Msg_Type:type, id, ...) {
280 new r, g, b, a, v; 282 new r, g, b, a, v;
281 283
282 if ((type != MSG_INT) || (id != 1)) return; 284 if (type != MSG_INT)
285 return;
286 if (id == 1) {
287 v = (getarg(2) * 255) / 100;
283 288
284 v = (getarg(2) * 255) / 100; 289 custom_state(PART:"shadow", "default", 0.0);
290 get_state_val(PART:"shadow", STATE_COLOR, r, g, b, a);
291 set_state_val(PART:"shadow", STATE_COLOR, r, g, b, v);
292 set_state(PART:"shadow", "custom", 0.0);
285 293
286 custom_state(PART:"shadow", "default", 0.0); 294 custom_state(PART:"base", "default", 0.0);
287 get_state_val(PART:"shadow", STATE_COLOR, r, g, b, a); 295 get_state_val(PART:"base", STATE_COLOR, r, g, b, a);
288 set_state_val(PART:"shadow", STATE_COLOR, r, g, b, v); 296 set_state_val(PART:"base", STATE_COLOR, r, g, b, v);
289 set_state(PART:"shadow", "custom", 0.0); 297 set_state(PART:"base", "custom", 0.0);
298 } else if (id == 2) {
299 v = getarg(2);
300
301 custom_state(PART:"shine_focused", "focused", 0.0);
302 get_state_val(PART:"shine_focused", STATE_COLOR, r, g, b, a);
303 set_state_val(PART:"shine_focused", STATE_COLOR, r, g, b, v);
304 set_state(PART:"shine_focused", "custom", 0.0);
290 305
291 custom_state(PART:"base", "default", 0.0); 306 custom_state(PART:"shine_unfocused", "default", 0.0);
292 get_state_val(PART:"base", STATE_COLOR, r, g, b, a); 307 get_state_val(PART:"shine_unfocused", STATE_COLOR, r, g, b, a);
293 set_state_val(PART:"base", STATE_COLOR, r, g, b, v); 308 set_state_val(PART:"shine_unfocused", STATE_COLOR, r, g, b, v/8);
294 set_state(PART:"base", "custom", 0.0); 309 set_state(PART:"shine_unfocused", "custom", 0.0);
310 }
295 } 311 }
296 } 312 }
297 parts { 313 parts {
@@ -697,7 +713,7 @@ collections {
697 visible: 0; 713 visible: 0;
698 } 714 }
699 } 715 }
700 part { name: "shine"; 716 part { name: "shine_focused";
701 mouse_events: 0; 717 mouse_events: 0;
702 description { state: "default" 0.0; 718 description { state: "default" 0.0;
703 rel1.offset: 0 0; 719 rel1.offset: 0 0;
@@ -707,13 +723,30 @@ collections {
707 align: 0.5 0.0; 723 align: 0.5 0.0;
708 aspect: (256/120) (256/120); 724 aspect: (256/120) (256/120);
709 aspect_preference: HORIZONTAL; 725 aspect_preference: HORIZONTAL;
710 color: 255 255 255 64; 726 color: 255 255 255 0;
711 } 727 }
712 description { state: "focused" 0.0; 728 description { state: "focused" 0.0;
713 inherit: "default" 0.0; 729 inherit: "default" 0.0;
714 color: 255 255 255 255; 730 color: 255 255 255 255;
715 } 731 }
716 } 732 }
733 part { name: "shine_unfocused";
734 mouse_events: 0;
735 description { state: "default" 0.0;
736 rel1.offset: 0 0;
737 rel2.offset: -1 -1;
738 image.normal: "bg_shine";
739 fill.smooth: 0;
740 align: 0.5 0.0;
741 aspect: (256/120) (256/120);
742 aspect_preference: HORIZONTAL;
743 color: 255 255 255 64;
744 }
745 description { state: "focused" 0.0;
746 inherit: "default" 0.0;
747 color: 255 255 255 0;
748 }
749 }
717 part { name: "glintclip"; type: RECT; 750 part { name: "glintclip"; type: RECT;
718 description { state: "default" 0.0; 751 description { state: "default" 0.0;
719 } 752 }
@@ -1005,19 +1038,31 @@ collections {
1005 action: STATE_SET "focused" 0.0; 1038 action: STATE_SET "focused" 0.0;
1006 target: "glint"; 1039 target: "glint";
1007 target: "glow"; 1040 target: "glow";
1008 target: "shine"; 1041 target: "shine_unfocused";
1042 target: "shine_focused";
1009 after: "focus_in2"; 1043 after: "focus_in2";
1044#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
1045 sequence {
1046 action: STATE_SET "custom" 0.0;
1047 target: "shine_focused";
1048 }
1049#endif
1010 } 1050 }
1011 program { 1051 program {
1012 signal: "focused,set"; source: "terminology"; 1052 signal: "focused,set"; source: "terminology";
1013 action: STATE_SET "focused" 0.0; 1053 action: STATE_SET "focused" 0.0;
1014 target: "glint"; 1054 target: "glint";
1015 target: "shine"; 1055 target: "shine_focused";
1056 target: "shine_unfocused";
1016#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9) 1057#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
1017 sequence { 1058 sequence {
1018 action: STATE_SET "focused2" 0.0; 1059 action: STATE_SET "focused2" 0.0;
1019 target: "glow"; 1060 target: "glow";
1020 } 1061 }
1062 sequence {
1063 action: STATE_SET "custom" 0.0;
1064 target: "shine_focused";
1065 }
1021#endif 1066#endif
1022 } 1067 }
1023 program { name: "focus_in2"; 1068 program { name: "focus_in2";
@@ -1030,7 +1075,18 @@ collections {
1030 action: STATE_SET "default" 0.0; 1075 action: STATE_SET "default" 0.0;
1031 target: "glint"; 1076 target: "glint";
1032 target: "glow"; 1077 target: "glow";
1033 target: "shine"; 1078 target: "shine_focused";
1079 target: "shine_unfocused";
1080#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
1081 sequence {
1082 action: STATE_SET "focused2" 0.0;
1083 target: "glow";
1084 }
1085 sequence {
1086 action: STATE_SET "custom" 0.0;
1087 target: "shine_unfocused";
1088 }
1089#endif
1034 } 1090 }
1035 1091
1036 //////////////////////////////////////////////////////////////////// 1092 ////////////////////////////////////////////////////////////////////