raster pushed a commit to branch master.

http://git.enlightenment.org/themes/dark.git/commit/?id=7c24a05745212e4a7b1f9ed50e9f0d88b1923e27

commit 7c24a05745212e4a7b1f9ed50e9f0d88b1923e27
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Fri Oct 4 22:38:34 2013 +0900

    popup done. and yes... this breaks popup theme api.
---
 edje/dark.edc               |   3 +-
 edje/edc/elm/button.edc     |  30 +--
 edje/edc/elm/gengrid.edc    |   3 +
 edje/edc/elm/popup.edc      | 451 ++++++++++++++++++++++++++++++++++++++++++++
 edje/edc/elm/scroller.edc   |   2 +
 edje/img/rounded_square.png | Bin 0 -> 883 bytes
 6 files changed, 472 insertions(+), 17 deletions(-)

diff --git a/edje/dark.edc b/edje/dark.edc
index 75921cc..59e0d3a 100644
--- a/edje/dark.edc
+++ b/edje/dark.edc
@@ -61,8 +61,7 @@ collections {
 // XXX: needs design work (naviframe)
 //#include "edc/elm/naviframe.edc"
 #include "edc/elm/panel.edc"
-// XXX: needs design work (popup), but edc needs to also scale up and down but 
not be so fat when scale is down/finger size smaller
-//#include "edc/elm/popup.edc"
+#include "edc/elm/popup.edc"
 #include "edc/elm/border.edc"
 #include "edc/elm/spinner.edc"
 #include "edc/elm/menu.edc"
diff --git a/edje/edc/elm/button.edc b/edje/edc/elm/button.edc
index cc7a034..cae568f 100644
--- a/edje/edc/elm/button.edc
+++ b/edje/edc/elm/button.edc
@@ -234,7 +234,7 @@ group { name: "elm/button/base/default";
          signal: "mouse,clicked,1"; source: "event";
          action: SIGNAL_EMIT "elm,action,click" "";
       }
-      program { name:   "button_text_visible";
+      program { name: "button_text_visible";
          signal: "elm,state,text,visible"; source: "elm";
          script {
             new m = get_int(btmode);
@@ -242,7 +242,7 @@ group { name: "elm/button/base/default";
             eval_mode(m);
          }
       }
-      program { name:   "button_text_hidden";
+      program { name: "button_text_hidden";
          signal: "elm,state,text,hidden"; source: "elm";
          script {
             new m = get_int(btmode);
@@ -250,7 +250,7 @@ group { name: "elm/button/base/default";
             eval_mode(m);
          }
       }
-      program { name:   "button_icon_visible";
+      program { name: "button_icon_visible";
          signal: "elm,state,icon,visible"; source: "elm";
          script {
             new m = get_int(btmode);
@@ -258,7 +258,7 @@ group { name: "elm/button/base/default";
             eval_mode(m);
          }
       }
-      program { name:   "button_icon_hidden";
+      program { name: "button_icon_hidden";
          signal: "elm,state,icon,hidden"; source: "elm";
          action:  STATE_SET "default" 0.0;
          script {
@@ -267,7 +267,7 @@ group { name: "elm/button/base/default";
             eval_mode(m);
          }
       }
-      program { name:   "button_state_disabled";
+      program { name: "button_state_disabled";
          signal: "elm,state,disabled"; source: "elm";
          script {
             new m = get_int(btmode);
@@ -275,7 +275,7 @@ group { name: "elm/button/base/default";
             eval_mode(m);
          }
       }
-      program { name:   "button_state_enabled";
+      program { name: "button_state_enabled";
          signal: "elm,state,enabled"; source: "elm";
          script {
             new m = get_int(btmode);
@@ -550,7 +550,7 @@ group { name: "elm/button/base/anchor";
          action: SIGNAL_EMIT "elm,action,press" "";
          after: "button_click_anim";
       }
-      program { name:   "button_click_anim";
+      program { name: "button_click_anim";
          action: STATE_SET "clicked" 0.0;
          target: "base";
          target: "bar2";
@@ -561,7 +561,7 @@ group { name: "elm/button/base/anchor";
          action: SIGNAL_EMIT "elm,action,unpress" "";
          after: "button_unclick_anim";
       }
-      program { name:   "button_unclick_anim";
+      program { name: "button_unclick_anim";
          action: STATE_SET "default" 0.0;
          target: "base";
          target: "bar2";
@@ -575,7 +575,7 @@ group { name: "elm/button/base/anchor";
          target: "text2";
          after: "button_unpressed_anim";
       }
-      program { name:   "button_unpressed_anim";
+      program { name: "button_unpressed_anim";
          action: STATE_SET "default" 0.0;
          in: 0.5 0.0;
          target: "base";
@@ -586,7 +586,7 @@ group { name: "elm/button/base/anchor";
          signal: "mouse,clicked,1"; source: "event";
          action: SIGNAL_EMIT "elm,action,click" "";
       }
-      program {
+      program { name: "button_text_visible";
          signal: "elm,state,text,visible"; source: "elm";
          script {
             new m = get_int(btmode);
@@ -594,7 +594,7 @@ group { name: "elm/button/base/anchor";
             eval_mode(m);
          }
       }
-      program {
+      program { name: "button_text_hidden";
          signal: "elm,state,text,hidden"; source: "elm";
          script {
             new m = get_int(btmode);
@@ -602,7 +602,7 @@ group { name: "elm/button/base/anchor";
             eval_mode(m);
          }
       }
-      program {
+      program { name: "button_icon_visible";
          signal: "elm,state,icon,visible"; source: "elm";
          script {
             new m = get_int(btmode);
@@ -610,7 +610,7 @@ group { name: "elm/button/base/anchor";
             eval_mode(m);
          }
       }
-      program {
+      program { name: "button_icon_hidden";
          signal: "elm,state,icon,hidden"; source: "elm";
          action:  STATE_SET "default" 0.0;
          script {
@@ -619,7 +619,7 @@ group { name: "elm/button/base/anchor";
             eval_mode(m);
          }
       }
-      program {
+      program { name: "button_state_disabled";
          signal: "elm,state,disabled"; source: "elm";
          script {
             new m = get_int(btmode);
@@ -627,7 +627,7 @@ group { name: "elm/button/base/anchor";
             eval_mode(m);
          }
       }
-      program {
+      program { name: "button_state_enabled";
          signal: "elm,state,enabled"; source: "elm";
          script {
             new m = get_int(btmode);
diff --git a/edje/edc/elm/gengrid.edc b/edje/edc/elm/gengrid.edc
index 3d75d04..4ffce94 100644
--- a/edje/edc/elm/gengrid.edc
+++ b/edje/edc/elm/gengrid.edc
@@ -979,3 +979,6 @@ group { name: "elm/gengrid/item/thumb/default";
       }
    }
 }
+#undef IMGP
+#undef BASEP
+#undef TOPP
diff --git a/edje/edc/elm/popup.edc b/edje/edc/elm/popup.edc
new file mode 100644
index 0000000..5da47c8
--- /dev/null
+++ b/edje/edc/elm/popup.edc
@@ -0,0 +1,451 @@
+group { name: "elm/notify/block_events/popup/default";
+   parts {
+      part { name: "base"; type: RECT;
+         description { state: "default" 0.0;
+            color: 0 0 0 128;
+         }
+      }
+      program {
+         signal: "mouse,clicked,1"; source: "base";
+         action: SIGNAL_EMIT "elm,action,click" "elm";
+      }
+   }
+}
+
+group { name: "elm/notify/block_events/popup/transparent";
+   parts {
+      part { name: "base"; type: RECT;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+         description { state: "clicked" 0.0;
+            color: 0 0 0 192;
+         }
+      }
+      program {
+         signal: "mouse,down,1"; source: "base";
+         action: SIGNAL_EMIT "elm,action,click" "elm";
+         after: "click1";
+      }
+      program { name: "click1";
+         action: STATE_SET "clicked" 0.0;
+         target: "base";
+         transition: SINUSOIDAL 0.2;
+      }
+      program {
+         signal: "mouse,up,1"; source: "base";
+         action: STATE_SET "default" 0.0;
+         target: "base";
+         transition: DECELERATE 0.5;
+      }
+   }
+}
+
+group { name: "elm/notify/top/popup/default";
+   inherit: "elm/notify/top/default";
+#define OVERRIDE_BASE() \
+   images.image: "rounded_square.png" COMP; \
+   parts { \
+      part { name: "base"; \
+         description { state: "default" 0.0; \
+            image.normal: "rounded_square.png"; \
+         } \
+         description { state: "visible" 0.0; \
+            image.normal: "rounded_square.png"; \
+         } \
+      } \
+   }
+   OVERRIDE_BASE()
+}
+
+group { name: "elm/notify/bottom/popup/default";
+   inherit: "elm/notify/bottom/default";
+   OVERRIDE_BASE()
+}
+
+group { name: "elm/notify/left/popup/default";
+   inherit: "elm/notify/left/default";
+   OVERRIDE_BASE()
+}
+
+group { name: "elm/notify/right/popup/default";
+   inherit: "elm/notify/right/default";
+   OVERRIDE_BASE()
+}
+
+group { name: "elm/notify/top_left/popup/default";
+   inherit: "elm/notify/top_left/default";
+   OVERRIDE_BASE()
+}
+
+group { name: "elm/notify/top_right/popup/default";
+   inherit: "elm/notify/top_right/default";
+   OVERRIDE_BASE()
+}
+
+group { name: "elm/notify/bottom_left/popup/default";
+   inherit: "elm/notify/bottom_left/default";
+   OVERRIDE_BASE()
+}
+
+group { name: "elm/notify/bottom_right/popup/default";
+   inherit: "elm/notify/bottom_right/default";
+   OVERRIDE_BASE()
+}
+
+group { name: "elm/notify/center/popup/default";
+   inherit: "elm/notify/center/default";
+   OVERRIDE_BASE()
+}
+#undef OVERRIDE_BASE
+
+group { name: "elm/notify/top/popup/transparent";
+   inherit: "elm/notify/top/default";
+}
+
+group { name: "elm/notify/bottom/popup/transparent";
+   inherit: "elm/notify/bottom/default";
+}
+
+group { name: "elm/notify/left/popup/transparent";
+   inherit: "elm/notify/left/default";
+}
+
+group { name: "elm/notify/right/popup/transparent";
+   inherit: "elm/notify/right/default";
+}
+
+group { name: "elm/notify/top_left/popup/transparent";
+   inherit: "elm/notify/top_left/default";
+}
+
+group { name: "elm/notify/top_right/popup/transparent";
+   inherit: "elm/notify/top_right/default";
+}
+
+group { name: "elm/notify/bottom_left/popup/transparent";
+   inherit: "elm/notify/bottom_left/default";
+}
+
+group { name: "elm/notify/bottom_right/popup/transparent";
+   inherit: "elm/notify/bottom_right/default";
+}
+
+group { name: "elm/notify/center/popup/transparent";
+   inherit: "elm/notify/center/default";
+}
+
+group { name: "elm/label/base/popup/default";
+   alias: "elm/label/base/popup/transparent";
+   styles {
+      style { name: "popup_desc_style";
+         base: "font="FN" font_size=10 text_class=label align=center 
color=#fff style=shadow,bottom shadow_color=#00000080 wrap=mixed";
+         tag: "br" "\n";
+         tag: "hilight" "+ font="FNBD" text_class=label_light";
+         tag: "b" "+ font="FNBD" text_class=label_light";
+         tag: "whitecolor" "+ color=#fff";
+         tag: "tab" "\t";
+      }
+   }
+   parts {
+      part { name: "elm.text"; type: TEXTBLOCK; mouse_events: 0;
+         scale: 1;
+         description { state: "default" 0.0;
+            text {
+               style: "popup_desc_style";
+               min: 0 1;
+               max: 0 1;
+            }
+            rel1.offset: 2 2;
+            rel2.offset: -3 -3;
+         }
+      }
+   }
+}
+
+group { name: "elm/button/base/popup/default";
+   inherit: "elm/button/base/default";
+}
+
+group { name: "elm/button/base/popup/transparent";
+   inherit: "elm/button/base/anchor";
+}
+
+group { name: "elm/popup/base/default";
+   alias: " elm/popup/base/transparent";
+   styles {
+      style { name: "popup_title_style";
+         base: "font="FNBD" font_size=10 text_class=label align=center 
color=#fff style=shadow,bottom shadow_color=#00000080 wrap=mixed";
+         tag: "br" "\n";
+         tag: "hilight" "+ font="FNBD" text_class=label_light";
+         tag: "b" "+ font="FNBD" text_class=label_light";
+         tag: "whitecolor" "+ color=#fff";
+         tag: "tab" "\t";
+      }
+   }
+   parts {
+      part { name: "base"; type: SPACER;
+         scale: 1;
+         description { state: "default" 0.0;
+            min: 240 0;
+         }
+      }
+      part { name: "elm.bg.title"; type: RECT;
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel1.to: "elm.text.title";
+            rel2.to: "elm.text.title";
+            visible: 0;
+         }
+      }
+      part { name: "elm.text.title"; type: TEXTBLOCK;
+         scale: 1;
+         description { state: "default" 0.0;
+            fixed: 0 1;
+            text {
+              style: "popup_title_style";
+              min: 1 1;
+            }
+            visible: 0;
+            rel1.offset: 2 2;
+            rel2.offset: -3 2;
+            rel2.relative: 1.0 0.0;
+            align: 0.5 0.0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+      part { name: "elm.swallow.title.icon"; type: SWALLOW;
+         scale: 1;
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            align: 0.0 0.5;
+            rel1.to_y: "elm.text.title";
+            rel2.to_y: "elm.text.title";
+            rel2.relative: 0.0 1.0;
+            aspect: 1.0 1.0; aspect_preference: VERTICAL;
+            visible: 0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+      part { name: "elm.swallow.content"; type: SWALLOW;
+         description { state: "default" 0.0;
+            rel1.offset: 2 2;
+            rel2.offset: -3 -3;
+         }
+         description { state: "show_title_area" 0.0;
+            inherit: "default" 0.0;
+            rel1.relative: 0.0 1.0;
+            rel1.to_y: "elm.bg.title";
+         }
+         description { state: "show_action_area" 0.0;
+            inherit: "default" 0.0;
+            rel2.relative: 1.0 0.0;
+            rel2.to_y: "elm.swallow.action_area";
+         }
+         description { state: "show_action_title_area" 0.0;
+            inherit: "default" 0.0;
+            rel1.relative: 0.0 1.0;
+            rel1.to_y: "elm.bg.title";
+            rel2.relative: 1.0 0.0;
+            rel2.to_y: "elm.swallow.action_area";
+         }
+      }
+      part { name: "elm.swallow.action_area"; type: SWALLOW;
+         scale: 1;
+         description { state: "default" 0.0;
+            fixed: 0 1;
+            align: 0.5 1.0;
+            visible: 0;
+            rel1.relative: 0.0 1.0;
+            rel1.offset: 2 -3;
+            rel1.to: "base";
+            rel2.offset: -3 -3;
+            rel2.to: "base";
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+      
+      part { name: "access.title"; type: RECT; repeat_events: 1;
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel1.to: "elm.bg.title";
+            rel2.to: "elm.bg.title";
+            color: 0 0 0 0;
+         }
+      }
+      part { name: "access.body"; type: RECT; repeat_events: 1;
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel1.to: "elm.swallow.content";
+            rel2.to: "elm.swallow.content";
+            color: 0 0 0 0;
+         }
+      }
+   }
+   programs {
+      program {
+         signal: "elm,state,title,icon,visible"; source: "elm";
+         action: STATE_SET "visible" 0.0;
+         target: "elm.swallow.title.icon";
+      }
+      program {
+         signal: "elm,state,title,icon,hidden"; source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "elm.swallow.title.icon";
+      }
+      program {
+         signal: "elm,state,title,text,visible"; source: "elm";
+         action: STATE_SET "visible" 0.0;
+         target: "elm.text.title";
+      }
+      program {
+         signal: "elm,state,title,text,hidden"; source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "elm.text.title";
+      }
+      program {
+         signal: "elm,state,title_area,visible"; source: "elm";
+         script {
+            new st[31], Float:vl;
+            get_state(PART:"elm.swallow.action_area", st, 30, vl);
+            if (!strcmp(st, "visible"))
+              set_state(PART:"elm.swallow.content", "show_action_title_area", 
0.0);
+            else
+              set_state(PART:"elm.swallow.content", "show_title_area", 0.0);
+            set_state(PART:"elm.text.title", "visible", 0.0);
+         }
+      }
+      program {
+         signal: "elm,state,title_area,hidden"; source: "elm";
+         script {
+            new st[31], Float:vl;
+            get_state(PART:"elm.swallow.action_area", st, 30, vl);
+            if (!strcmp(st, "visible"))
+              set_state(PART:"elm.swallow.content", "show_action_area", 0.0);
+            else
+              set_state(PART:"elm.swallow.content", "default", 0.0);
+            set_state(PART:"elm.text.title", "default", 0.0);
+         }
+      }
+      program {
+         signal: "elm,state,action_area,visible"; source: "elm";
+         script {
+            new st[31], Float:vl;
+            get_state(PART:"elm.text.title", st, 30, vl);
+            if (!strcmp(st, "visible"))
+              set_state(PART:"elm.swallow.content", "show_action_title_area", 
0.0);
+            else
+              set_state(PART:"elm.swallow.content", "show_action_area", 0.0);
+            set_state(PART:"elm.swallow.action_area", "visible", 0.0);
+         }
+      }
+      program {
+         signal: "elm,state,action_area,hidden"; source: "elm";
+         script {
+            new st[31], Float:vl;
+            get_state(PART:"elm.text.title", st, 30, vl);
+            if (!strcmp(st, "visible"))
+              set_state(PART:"elm.swallow.content", "show_title_area", 0.0);
+            else
+              set_state(PART:"elm.swallow.content", "default", 0.0);
+            set_state(PART:"elm.swallow.action_area", "default", 0.0);
+         }
+      }
+   }
+}
+
+group { name: "elm/popup/content/popup/default";
+   alias: "elm/popup/content/popup/transparent";
+   parts {
+      part { name:"elm.swallow.content"; type: SWALLOW;
+         description { state: "default" 0.0;
+         }
+      }
+   }
+}
+
+group { name: "elm/popup/buttons1/popup/default";
+   alias: "elm/popup/buttons1/popup/transparent";
+   data.item: "action_area_height" "80";
+   parts {
+      part { name:"elm.swallow.content.button1"; type: SWALLOW;
+         description { state: "default" 0.0;
+         }
+      }
+   }
+}
+
+group { name: "elm/popup/buttons2/popup/default";
+   alias: "elm/popup/buttons2/popup/transparent";
+   data.item: "action_area_height" "80";
+   parts{
+      part{ name:"elm.swallow.content.button1"; type: SWALLOW;
+         description { state: "default" 0.0;
+            rel2.relative: 0.5 1.0;
+         }
+      }
+      part{ name:"elm.swallow.content.button2"; type: SWALLOW;
+         description { state: "default" 0.0;
+            rel1.relative: 0.5 0.0;
+         }
+      }
+   }
+}
+
+group { name: "elm/popup/buttons3/popup/default";
+   alias: "elm/popup/buttons3/popup/transparent"; 
+   data.item: "action_area_height" "80";
+   parts{
+      part{ name:"elm.swallow.content.button1"; type: SWALLOW;
+         description { state: "default" 0.0;
+            rel2.relative: (1/3) 1.0;
+         }
+      }
+      part{ name:"elm.swallow.content.button2"; type: SWALLOW;
+         description { state: "default" 0.0;
+            rel1.relative: 1.0 0.0;
+            rel1.to: "elm.swallow.content.button1";
+            rel2.relative: 0.0 1.0;
+            rel2.to: "elm.swallow.content.button3";
+         }
+      }
+      part{ name:"elm.swallow.content.button3"; type: SWALLOW;
+         description { state: "default" 0.0;
+            rel1.relative: (2/3) 0.0;
+         }
+      }
+   }
+}
+
+group { name: "elm/popup/item/popup/default";
+   inherit: "elm/list/item/default";
+   parts {
+      part { name: "elm.swallow.content"; type: SWALLOW;
+         insert_after: "elm.swallow.icon";
+         description { state: "default" 0.0;
+            fixed: 0 1;
+            rel1.to: "elm.swallow.icon";
+            rel2.to: "elm.swallow.icon";
+         }
+      }
+   }
+   programs {
+      program {
+         signal: "mouse,down,1"; source: "event";
+         action: SIGNAL_EMIT "elm,state,selected" "elm";
+      }
+      program {
+         signal: "mouse,up,1"; source: "event";
+         action: SIGNAL_EMIT "elm,state,unselected" "elm";
+      }
+   }
+}
diff --git a/edje/edc/elm/scroller.edc b/edje/edc/elm/scroller.edc
index 6020c6d..a1a02f3 100644
--- a/edje/edc/elm/scroller.edc
+++ b/edje/edc/elm/scroller.edc
@@ -4,6 +4,8 @@ group { name: "elm/scroller/base/default";
    alias: "elm/gengrid/base/default";
    alias: "elm/scroller/base/map_bubble";
    alias: "elm/genscroller/base/default";
+   alias: "elm/scroller/base/popup/default";
+   alias: "elm/scroller/base/popup/transparent";
 
    images.image: "inset_shadow.png" COMP;
    images.image: "bevel_in.png" COMP;
diff --git a/edje/img/rounded_square.png b/edje/img/rounded_square.png
new file mode 100644
index 0000000..1c0eb93
Binary files /dev/null and b/edje/img/rounded_square.png differ

-- 


Reply via email to