okra pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e7b2dc001797cbbc9439f3e79a6f6b2a534a3885

commit e7b2dc001797cbbc9439f3e79a6f6b2a534a3885
Author: Stephen 'Okra' Houston <[email protected]>
Date:   Wed Feb 8 08:54:44 2017 -0600

    Give Batman it's own edc.
---
 data/elementary/themes/Makefile.am    |   1 +
 data/elementary/themes/default.edc    |   1 +
 data/elementary/themes/edc/batman.edc | 287 ++++++++++++++++++++++++++++++++++
 3 files changed, 289 insertions(+)

diff --git a/data/elementary/themes/Makefile.am 
b/data/elementary/themes/Makefile.am
index 42e0b28..d48aaca 100644
--- a/data/elementary/themes/Makefile.am
+++ b/data/elementary/themes/Makefile.am
@@ -22,6 +22,7 @@ elementary/themes/edc/appmenu.edc \
 elementary/themes/edc/background.edc \
 elementary/themes/edc/backlight.edc \
 elementary/themes/edc/battery.edc \
+elementary/themes/edc/batman.edc \
 elementary/themes/edc/bluez4.edc \
 elementary/themes/edc/border.edc \
 elementary/themes/edc/border-icons.edc \
diff --git a/data/elementary/themes/default.edc 
b/data/elementary/themes/default.edc
index 5e801b4..936df6b 100644
--- a/data/elementary/themes/default.edc
+++ b/data/elementary/themes/default.edc
@@ -142,6 +142,7 @@ collections {
 #include "edc/backlight.edc"
 #include "edc/mixer.edc"
 #include "edc/battery.edc"
+#include "edc/batman.edc"
 #include "edc/evrything.edc"
 #include "edc/illume.edc"
 #include "edc/bluez4.edc"
diff --git a/data/elementary/themes/edc/batman.edc 
b/data/elementary/themes/edc/batman.edc
new file mode 100644
index 0000000..d05eeb7
--- /dev/null
+++ b/data/elementary/themes/edc/batman.edc
@@ -0,0 +1,287 @@
+group { name: "e/modules/batman/main";
+   images.image: "bat_shadow.png" COMP;
+   images.image: "bat_base.png" COMP;
+   images.image: "bat_shine.png" COMP;
+   images.image: "bat_bottom0.png" COMP;
+   images.image: "bat_bottom1.png" COMP;
+   images.image: "bat_top0.png" COMP;
+   images.image: "bat_top1.png" COMP;
+   images.image: "glow_med_white.png" COMP;
+   script {
+      public message(Msg_Type:type, id, ...) {
+         if ((type == MSG_FLOAT) && (id == 1)) {
+            new Float:val;
+            new r = 51, g = 153, b = 255;
+            new lr = 255, lg = 0, lb = 0;
+            
+            val = getfarg(2);
+            if (val < 0.35) {
+               new Float:val1, Float:val2;
+               
+               val1 = (val - 0.10) / 0.25;
+               val2 = 1.0 - val1;
+               r = round((r * val1) + (lr * val2), ROUND);
+               g = round((g * val1) + (lg * val2), ROUND);
+               b = round((b * val1) + (lb * val2), ROUND);
+            } 
+            custom_state(PART:"fill", "default", 0.0);
+            set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
+            set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
+            set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
+            set_state_val(PART:"fill", STATE_REL1, 0.0, 1.0 - val);
+            set_state(PART:"fill", "custom", 0.0);
+         }
+      }
+   }
+   parts {
+      part { name: "fade_clip"; type: RECT;
+         description { state: "default" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "faded" 0.0;
+            color: 128 128 128 255;
+         }
+      }
+      part { name: "pulse_clip"; type: RECT;
+         clip_to: "fade_clip";
+         description { state: "default" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "faded" 1.0;
+            color: 255 255 255 255;
+         }
+         description { state: "faded" 0.0;
+            color: 255 255 255 64;
+         }
+      }
+      part { name: "fill_region"; type: SPACER;
+         description { state: "default" 0.0;
+            rel1.to: "bg";
+            rel2.to: "bg";
+         }
+      }
+      part { name: "pwr"; type: SPACER;
+         description { state: "default" 0.0;
+            rel1.to: "bg";
+            rel1.relative: 0.40 0.40;
+            rel2.to: "bg";
+            rel2.relative: 0.60 0.60;
+            aspect: 1.0 1.0; aspect_preference: BOTH;
+            step: 5 5;
+         }
+      }
+      part { name: "base"; type: SPACER;
+         description { state: "default" 0.0;
+            aspect: 1.0 1.0; aspect_preference: BOTH;
+         }
+      }
+      part { name: "shadow";
+         clip_to: "pulse_clip";
+         description { state: "default" 0.0;
+            rel1.to: "top";
+            rel1.offset: -4 0;
+            rel2.to: "bottom";
+            rel2.offset: 3 3;
+            image.normal: "bat_shadow.png";
+         }
+      }
+      part { name: "bg";
+         clip_to: "pulse_clip";
+         description { state: "default" 0.0;
+            rel1.to: "top";
+            rel1.relative: 0.0 1.0;
+            rel2.to: "bottom";
+            rel2.relative: 1.0 0.0;
+            image.normal: "bat_base.png";
+            fill.smooth: 0;
+         }
+      }
+      part { name: "top";
+         clip_to: "pulse_clip";
+         description { state: "default" 0.0;
+            rel1.to: "base";
+            rel1.offset: 6 4;
+            rel2.to: "base";
+            rel2.offset: -7 4;
+            rel2.relative: 1.0 0.0;
+            aspect: (112/24) (112/24); aspect_preference: HORIZONTAL;
+            align: 0.5 0.0;
+            image.normal: "bat_top0.png";
+         }
+      }
+      part { name: "bottom";
+         clip_to: "pulse_clip";
+         description { state: "default" 0.0;
+            rel1.to: "base";
+            rel1.offset: 6 -5;
+            rel2.to: "base";
+            rel2.offset: -7 -5;
+            aspect: (112/12) (112/12); aspect_preference: HORIZONTAL;
+            align: 0.5 1.0;
+            image.normal: "bat_bottom0.png";
+         }
+      }
+      part { name: "fill"; mouse_events: 0;
+         clip_to: "pulse_clip";
+         description { state: "default" 0.0;
+            rel1.to: "fill_region";
+            rel1.offset: -5 -5;
+            rel2.to: "fill_region";
+            rel2.offset: 4 4;
+            image.normal: "glow_med_white.png";
+            image.border: 10 10 10 10;
+            color: 51 153 255 255;
+         }
+      }
+      part { name: "top-shine";
+         clip_to: "pulse_clip";
+         description { state: "default" 0.0;
+            rel1.to: "top";
+            rel2.to: "top";
+            image.normal: "bat_top1.png";
+         }
+      }
+      part { name: "bottom-shine";
+         clip_to: "pulse_clip";
+         description { state: "default" 0.0;
+            rel1.to: "bottom";
+            rel2.to: "bottom";
+            image.normal: "bat_bottom1.png";
+         }
+      }
+      part { name: "shine";
+         clip_to: "pulse_clip";
+         description { state: "default" 0.0;
+            rel1.to: "bg";
+            rel1.offset: 0 -6;
+            rel2.to: "bg";
+            rel2.offset: -1 5;
+            image.normal: "bat_shine.png";
+            image.border: 0 0 7 7;
+         }
+      }
+      part { name: "pwr1";
+         clip_to: "pulse_clip";
+         description { state: "default" 0.0;
+            rel1.to: "pwr";
+            rel1.relative: (2/5) 0.0;
+            rel1.offset: -5 -5;
+            rel2.to: "pwr";
+            rel2.relative: (3/5) 1.0;
+            rel2.offset: 4 4;
+            image.normal: "glow_med_white.png";
+            image.border: 5 5 5 5;
+            fill.smooth: 0;
+            visible: 0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+      part { name: "pwr2";
+         clip_to: "pulse_clip";
+         description { state: "default" 0.0;
+            rel1.to: "pwr";
+            rel1.relative: 0.0 (2/5);
+            rel1.offset: -5 -5;
+            rel2.to: "pwr";
+            rel2.relative: 1.0 (3/5);
+            rel2.offset: 4 4;
+            image.normal: "glow_med_white.png";
+            image.border: 5 5 5 5;
+            fill.smooth: 0;
+            visible: 0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+      part { name: "over"; type: RECT;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+      }
+   }
+   programs {
+      program {
+         signal: "e,state,charging"; source: "e";
+         action: STATE_SET "visible" 0.0;
+         target: "pwr1";
+         target: "pwr2";
+      }
+      program {
+         signal: "e,state,discharging"; source: "e";
+         action: STATE_SET "default" 0.0;
+         target: "pwr1";
+         target: "pwr2";
+      }
+      program {
+         signal: "e,state,unknown"; source: "e";
+         action: STATE_SET "faded" 0.0;
+         target: "fade_clip";
+      }
+      program { name: "pulse";
+         signal: "e,action,pulse,start"; source: "e";
+         action: STATE_SET "faded" 0.0;
+         transition: ACCELERATE 0.3;
+         after: "pulse2";
+         target: "pulse_clip";
+      }
+      program { name: "pulse2";
+         action: STATE_SET "faded" 1.0; transition: ACCELERATE 0.1;
+         target: "pulse_clip";
+      }
+      program {
+         signal: "e,action,pulse,stop"; source: "e";
+         action: STATE_SET "default" 0.0;
+         target: "pulse_clip";
+      }
+   }
+}
+
+group { name: "e/modules/batman/popup";
+   min: 240 60;
+   parts {
+      part { name: "e.swallow.batman"; type: SWALLOW;
+         description { state: "default" 0.0;
+            aspect: 1.0 1.0; aspect_preference: VERTICAL;
+            min: 1 1;
+            max: 160 160;
+            align: 0.0 0.5;
+         }
+      }
+      part { name: "e.text.title"; type: TEXT;
+         effect: SHADOW BOTTOM;
+         scale: 1;
+         description { state: "default" 0.0;
+            rel1.relative: 1.0 0.0;
+            rel1.to_x: "e.swallow.batman";
+            rel2.relative: 1.0 0.5;
+            color: FN_COL_DEFAULT;
+            text { font: "Sans:style=Bold"; size: 10;
+               text: "Your battery is low!";
+               min: 1 1;
+               ellipsis: -1;
+               text_class: "module_large";
+            }
+         }
+      }
+      part { name: "e.text.label"; type: TEXT;
+         effect: SHADOW BOTTOM;
+         scale: 1;
+         description { state: "default" 0.0;
+            rel1.relative: 1.0 0.5;
+            rel1.to_x: "e.swallow.batman";
+            color: FN_COL_DEFAULT;
+            text { font: "Sans"; size: 10;
+               text: "AC power is recommended.";
+               min: 1 1;
+               ellipsis: -1;
+               text_class: "module_normal";
+            }
+         }
+      }
+   }
+}

-- 


Reply via email to