hermet pushed a commit to branch master.

commit b13121cb329679d8e26d447b31fe6b02d991ad70
Author: ChunEon Park <[email protected]>
Date:   Tue Aug 20 14:36:43 2013 +0900

    themes/dark - flipselector to go dark.
---
 edje/dark.edc                 |   2 +-
 edje/edc/elm/flipselector.edc | 528 ++++++++++++++++++++++++++++++++++++++++++
 edje/img/flip_base_shad.png   | Bin 0 -> 537 bytes
 edje/img/flip_shad.png        | Bin 0 -> 414 bytes
 4 files changed, 529 insertions(+), 1 deletion(-)

diff --git a/edje/dark.edc b/edje/dark.edc
index acdc033..2dfaded 100644
--- a/edje/dark.edc
+++ b/edje/dark.edc
@@ -48,7 +48,7 @@ collections {
 #include "edc/elm/colorsel.edc"
 #include "edc/elm/segment_control.edc"
 // needs design work   
-//#include "edc/elm/flipsel.edc"
+#include "edc/elm/flipselector.edc"
 #include "edc/elm/notify.edc"
 // needs some design work for markers (but busy etc. are done already)
 //#include "edc/elm/map.edc"
diff --git a/edje/edc/elm/flipselector.edc b/edje/edc/elm/flipselector.edc
new file mode 100644
index 0000000..7ace61a
--- /dev/null
+++ b/edje/edc/elm/flipselector.edc
@@ -0,0 +1,528 @@
+#define FLIP_PICKER_MAX_LEN (50)
+#define FLIP_PICKER_MAX_LEN_STR "50"
+
+group { name: "elm/flipselector/base/default";
+   images {
+      image: "flip_base_shad.png" COMP;
+      image: "flip_shad.png" COMP;
+      image: "sym_up_light_normal.png" COMP;
+      image: "sym_down_light_normal.png" COMP;
+      image: "shine.png" COMP;
+   }
+   data {
+      item: "max_len" FLIP_PICKER_MAX_LEN_STR;
+   }
+   //FIXME: quick successive clicks on, say, up, lead to nastiness
+   script {
+      public cur, prev, next, lock;
+
+      flip_up(str[]) {
+         new tmp[FLIP_PICKER_MAX_LEN];
+         if (get_int(lock) == 1) {
+            replace_str(next, 0, str);
+            return;
+         }
+         fetch_str(cur, 0, tmp, FLIP_PICKER_MAX_LEN);
+
+         set_text(PART:"bottom_text_prev", tmp);
+         set_state(PART:"elm.top", "shrink", 0.0);
+         set_text(PART:"elm.top", tmp);
+         set_state(PART:"elm.top", "default", 0.0);
+         set_text(PART:"elm.top", tmp);
+
+         replace_str(prev, 0, tmp);
+
+         set_state(PART:"elm.bottom", "default", 0.0);
+         set_text(PART:"elm.bottom", str);
+         set_state(PART:"elm.bottom", "shrink", 0.0);
+         set_text(PART:"elm.bottom", str);
+         set_text(PART:"top_text_prev", str);
+
+         replace_str(cur, 0, str);
+
+         set_state(PART:"bottom_cur", "shrink", 0.0);
+         set_state(PART:"top_cur", "default", 0.0);
+
+         set_int(lock, 1);
+         set_state(PART:"bottom_shadow", "default", 0.0);
+         anim(0.2, "animator_top_down", 1);
+      }
+      flip_dn(str[]) {      
+         new tmp[FLIP_PICKER_MAX_LEN];
+         if (get_int(lock) == 1) {
+            replace_str(next, 0, str);
+            return;
+         }
+
+         fetch_str(cur, 0, tmp, FLIP_PICKER_MAX_LEN);
+
+         set_text(PART:"top_text_prev", tmp);
+         set_state(PART:"elm.bottom", "shrink", 0.0);
+         set_text(PART:"elm.bottom", tmp);
+         set_state(PART:"elm.bottom", "default", 0.0);
+         set_text(PART:"elm.bottom", tmp);
+
+         replace_str(prev, 0, tmp);
+
+         set_state(PART:"elm.top", "default", 0.0);
+         set_text(PART:"elm.top", str);
+         set_state(PART:"elm.top", "shrink", 0.0);
+         set_text(PART:"elm.top", str);
+         set_text(PART:"bottom_text_prev", str);
+
+         replace_str(cur, 0, str);
+
+         set_state(PART:"bottom_cur", "default", 0.0);
+         set_state(PART:"top_cur", "shrink", 0.0);
+
+         set_int(lock, 1);
+         set_state(PART:"bottom_shadow", "full", 0.0);
+         anim(0.2, "animator_bottom_up", 1);
+      }
+      public animator_bottom_down(val, Float:pos) {
+         new tmp[FLIP_PICKER_MAX_LEN];
+
+         set_tween_state(PART:"elm.bottom", pos, "shrink", 0.0, "default", 
0.0);
+         set_tween_state(PART:"bottom_cur", pos, "shrink", 0.0, "default", 
0.0);
+         set_tween_state(PART:"bottom_shadow", pos, "half", 0.0, "full", 0.0);
+         set_state(PART:"bottom_shine_cur", "visible", 0.0);
+
+         if (pos >= 1.0) {
+            set_state(PART:"bottom_shadow", "default", 0.0);
+            set_state(PART:"bottom_shine_cur", "default", 0.0);
+            set_int(lock, 0);
+            fetch_str(next, 0, tmp, FLIP_PICKER_MAX_LEN);
+            if (strncmp(tmp, "", FLIP_PICKER_MAX_LEN) != 0) {
+               replace_str(next, 0, "");
+               flip_up(tmp);
+            }
+         }
+      }
+      public animator_top_down(val, Float:pos) {
+         set_tween_state(PART:"elm.top", pos, "default", 0.0, "shrink", 0.0);
+         set_tween_state(PART:"top_cur", pos, "default", 0.0, "shrink", 0.0);
+         set_tween_state(PART:"bottom_shadow", pos, "default", 0.0, "half",
+                         0.0);
+         if (pos >= 1.0)
+           {
+              set_state(PART:"top_shine_cur", "default", 0.0);
+              anim(0.2, "animator_bottom_down", val);
+           }
+      }
+      public animator_bottom_up(val, Float:pos) {
+         set_tween_state(PART:"elm.bottom", pos, "default", 0.0, "shrink", 
0.0);
+         set_tween_state(PART:"bottom_cur", pos, "default", 0.0, "shrink", 
0.0);
+         set_tween_state(PART:"bottom_shadow", pos, "full", 0.0, "half", 0.0);
+
+         if (pos >= 1.0) anim(0.2, "animator_top_up", val);
+      }
+      public animator_top_up(val, Float:pos) {
+         new tmp[FLIP_PICKER_MAX_LEN];
+
+         set_tween_state(PART:"elm.top", pos, "shrink", 0.0, "default", 0.0);
+         set_tween_state(PART:"top_cur", pos, "shrink", 0.0, "default", 0.0);
+         set_tween_state(PART:"bottom_shadow", pos, "half", 0.0, "default",
+                         0.0);
+         set_state(PART:"top_shine_cur", "visible", 0.0);
+
+         if (pos >= 1.0) {
+            set_state(PART:"bottom_shadow", "default", 0.0);
+            set_int(lock, 0);
+
+            fetch_str(next, 0, tmp, FLIP_PICKER_MAX_LEN);
+            if (strncmp(tmp, "", FLIP_PICKER_MAX_LEN) != 0) {
+               replace_str(next, 0, "");
+               flip_dn(tmp);
+            }
+         }
+      }
+      public message(Msg_Type:type, id, ...) {
+         /* flip down */
+         if ((type == MSG_STRING) && (id == 1)) {
+            new value[FLIP_PICKER_MAX_LEN];
+            snprintf(value, FLIP_PICKER_MAX_LEN, "%s", getarg(2));
+            flip_up(value);
+         /* flip up */
+         } else  if ((type == MSG_STRING) && (id == 2)) {
+            new value[FLIP_PICKER_MAX_LEN];
+            snprintf(value, FLIP_PICKER_MAX_LEN, "%s", getarg(2));
+            flip_dn(value);
+         }
+      }
+   }
+   parts {
+      part { name: "base_shadow";
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1 { offset: -4 -4; to: "base"; }
+            rel2 { offset: 3 6; to: "base"; }
+            image {
+               normal: "flip_base_shad.png";
+               border: 10 10 10 10;
+            }
+            fill.smooth: 0;
+         }
+      }
+      part { name: "base";
+         type: RECT;
+         scale: 1;
+         description { state: "default" 0.0;
+            rel1.offset: 6 4;
+            rel2.offset: -6 -7;
+         }
+      }
+      part { name: "bottom";
+         type: RECT;
+         mouse_events: 1;
+         description { state: "default" 0.0;
+            rel1 { to: "base"; relative: 0.0 0.5; }
+            rel2.to: "base";
+         }
+         description { state: "hidden" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+         }
+      }
+      part { name: "top";
+         type: RECT;
+         mouse_events: 1;
+         description { state: "default" 0.0;
+            rel1.to: "base";
+            rel2 { to: "base"; relative: 1.0 0.5; }
+            color: 0 0 0 0;
+         }
+         description { state: "hidden" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+         }
+      }
+      part { name: "bottom_prev";
+         type: RECT;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1.to: "bottom";
+            rel2.to: "bottom";
+            color: 80 79 79 255;
+         }
+      }
+      part { name: "bottom_text_prev";
+         type: TEXT;
+         effect: SHADOW BOTTOM;
+         mouse_events: 0;
+         scale: 1;
+         description { state: "default" 0.0;
+            rel1.to: "base";
+            rel2.to: "base";
+            text {
+               font: FN;
+               size: 20;
+               min: 1 1;
+               align: 0.5 0.5;
+            }
+            color: FN_COL_DEFAULT;
+         }
+      }
+      part { name: "bottom_shadow";
+         mouse_events: 0;
+         clip_to: "bottom_clipper";
+         description { state: "default" 0.0;
+            rel1.to: "bottom";
+            rel2 { to: "bottom"; relative: 1.0 0.0; }
+            image.normal: "flip_shad.png";
+            fill.smooth: 0;
+         }
+         description { state: "half" 0.0;
+            inherit: "default" 0.0;
+            rel2.relative: 1.0 1.0;
+         }
+         description { state: "full" 0.0;
+            inherit: "default" 0.0;
+            rel2.relative: 1.0 2.0;
+         }
+      }
+      part { name: "bottom_cur";
+         type: RECT;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1.to: "bottom";
+            rel2.to: "bottom";
+            color: 80 79 79 255;
+         }
+         description { state: "shrink" 0.0;
+            inherit: "default" 0.0;
+            rel2.relative: 1.0 0.0;
+         }
+      }
+      part { name: "bottom_shine_cur";
+         type: IMAGE;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1 { to: "bottom_cur"; relative: 0 1; }
+            rel2.to: "bottom_cur";
+            image.normal: "shine.png";
+            min: 0 1;
+            fixed: 0 1;
+            align: 0.5 1;
+            visible: 0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+      part { name: "elm.bottom";
+         type: TEXT;
+         effect: SHADOW BOTTOM;
+         mouse_events: 0;
+         scale: 1;
+         description { state: "default" 0.0;
+            rel1.to: "base";
+            rel2.to: "base";
+            text {
+               font: FN;
+               size: 20;
+               min: 1 1;
+               align: 0.5 0.5;
+            }
+            color: FN_COL_DEFAULT;
+         }
+         description { state: "shrink" 0.0;
+            inherit: "default" 0.0;
+            color: 128 128 128 255;
+            visible: 0;
+            rel2.relative: 1.0 0.5; /* FIXME: same visual effect? --> MAP! */
+         }
+      }
+      part { name: "top_prev";
+         type: RECT;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1.to: "top";
+            rel2.to: "top";
+            color: 70 69 69 255;
+         }
+      }
+      part { name: "top_text_prev";
+         type: TEXT;
+         effect: SHADOW BOTTOM;
+         mouse_events: 0;
+         clip_to: "top_clipper";
+         scale: 1;
+         description { state: "default" 0.0;
+            rel1.to: "base";
+            rel2.to: "base";
+            text {
+               font: FN;
+               size: 20;
+               min: 1 1;
+               align: 0.5 0.5;
+               source: "elm.top";
+            }
+            color: 205 205 205 255;
+            color3: 0 0 0 128;
+         }
+      }
+      part { name: "top_shine_prev";
+         type: IMAGE;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1.to: "top_prev";
+            rel2 { to: "top_prev"; relative: 1 0; }
+            image.normal: "shine.png";
+            min: 0 1;
+            fixed: 0 1;
+            align: 0.5 0;
+         }
+      }
+      part { name: "top_cur";
+         type: RECT;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1.to: "top";
+            rel2.to: "top";
+            color: 70 69 69 255;
+         }
+         description { state: "shrink" 0.0;
+            inherit: "default" 0.0;
+            rel1.relative: 0.0 1.0;
+            color: 40 39 39 255;
+         }
+      }
+      part { name: "elm.top";
+         type: TEXT;
+         effect: SHADOW BOTTOM;
+         mouse_events: 0;
+         clip_to: "top_clipper";
+         scale: 1;
+         description { state: "default" 0.0;
+            rel1.to: "base";
+            rel2.to: "base";
+            text {
+               font: FN;
+               size: 20;
+               min: 1 1;
+               align: 0.5 0.5;
+            }
+            color: 205 205 205 255;
+            color3: 0 0 0 128;
+         }
+         description { state: "shrink" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+            rel1.relative: 0.0 0.5;
+         }
+      }
+      part { name: "top_shine_cur";
+         type: IMAGE;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1.to: "top_cur";
+            rel2 { to: "top_cur"; relative: 1 0; }
+            image.normal: "shine.png";
+            min: 0 1;
+            fixed: 0 1;
+            align: 0.5 0;
+            visible: 0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+      part { name: "arrow_top";
+         mouse_events: 0;
+         clip_to: "disclip";
+         scale: 1;
+         description { state: "default" 0.0;
+            min: 15 15;
+            max: 15 15;
+            align: 0.5 0.0;
+            rel1.to: "top";
+            rel2.to: "top";
+            image.normal: "sym_up_light_normal.png";
+         }
+         description { state: "hidden" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+         }
+      }
+      part { name: "arrow_bottom";
+         mouse_events: 0;
+         clip_to: "disclip";
+         scale: 1;
+         description { state: "default" 0.0;
+            min: 15 15;
+            max: 15 15;
+            align: 0.5 1.0;
+            rel1.to: "bottom";
+            rel2.to: "bottom";
+            image.normal: "sym_down_light_normal.png";
+         }
+         description { state: "hidden" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+         }
+      }
+      part { name: "top_clipper";
+         type: RECT;
+         mouse_events: 0;
+         clip_to: "disclip";
+         description { state: "default" 0.0;
+            rel1.to: "top";
+            rel2.to: "top";
+         }
+      }
+      part { name: "bottom_clipper";
+         type: RECT;
+         clip_to: "disclip";
+         description { state: "default" 0.0;
+            rel1.to: "bottom";
+            rel2.to: "bottom";
+         }
+      }
+      part { name: "disclip";
+         type: RECT;
+         description { state: "default" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "enabled" 0.0;
+            color: 100 100 100 100;
+         }
+      }
+      part { name: "event_blocker";
+         type: RECT;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+            visible: 0;
+         }
+         description { state: "enabled" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+   }
+   programs {
+      program { name: "load";
+         signal: "load";
+         source: "";
+         script {
+            append_str(cur, "");
+            append_str(prev, "");
+            append_str(next, "");
+            set_int(lock, 0);
+         }
+      }
+      program { name: "hide_arrows";
+         signal: "elm,state,button,hidden";
+         source: "elm";
+         action: STATE_SET "hidden" 0.0;
+         target: "arrow_top";
+         target: "arrow_bottom";
+         target: "top";
+         target: "bottom";
+      }
+      program { name: "show_arrows";
+         signal: "elm,state,button,visible";
+         source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "arrow_top";
+         target: "arrow_bottom";
+         target: "top";
+         target: "bottom";
+      }
+      program { name: "up";
+         signal: "mouse,down,1";
+         source: "top";
+         action: SIGNAL_EMIT "elm,action,up,start" "";
+      }
+      program { name: "up,stop";
+         signal: "mouse,up,1";
+         source: "top";
+         action: SIGNAL_EMIT "elm,action,up,stop" "";
+      }
+      program { name: "down";
+         signal: "mouse,down,1";
+         source: "bottom";
+         action: SIGNAL_EMIT "elm,action,down,start" "";
+      }
+      program { name: "down,stop";
+         signal: "mouse,up,1";
+         source: "bottom";
+         action: SIGNAL_EMIT "elm,action,down,stop" "";
+      }
+      program { name: "disable";
+         signal: "elm,state,disabled";
+         source: "elm";
+         action: STATE_SET "enabled" 0.0;
+         target: "disclip";
+         target: "event_blocker";
+      }
+      program { name: "enable";
+         signal: "elm,state,enabled";
+         source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "disclip";
+         target: "event_blocker";
+      }
+   }
+}
diff --git a/edje/img/flip_base_shad.png b/edje/img/flip_base_shad.png
new file mode 100644
index 0000000..bb08227
Binary files /dev/null and b/edje/img/flip_base_shad.png differ
diff --git a/edje/img/flip_shad.png b/edje/img/flip_shad.png
new file mode 100644
index 0000000..9ceb205
Binary files /dev/null and b/edje/img/flip_shad.png differ

-- 

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk

Reply via email to