ctxpopup - updated default ctxpopup arrow size, modified coding style in some blocks.
authorChunEon Park <chuneon.park@samsung.com>
Thu, 14 Jul 2011 03:27:12 +0000 (12:27 +0900)
committerChunEon Park <chuneon.park@samsung.com>
Thu, 14 Jul 2011 03:27:12 +0000 (12:27 +0900)
data/themes/ctxpopup_arrow_down.png [new file with mode: 0644]
data/themes/ctxpopup_arrow_left.png [new file with mode: 0644]
data/themes/ctxpopup_arrow_right.png [new file with mode: 0644]
data/themes/ctxpopup_arrow_up.png [new file with mode: 0644]
data/themes/default.edc
src/lib/elc_ctxpopup.c

diff --git a/data/themes/ctxpopup_arrow_down.png b/data/themes/ctxpopup_arrow_down.png
new file mode 100644 (file)
index 0000000..c650cf4
Binary files /dev/null and b/data/themes/ctxpopup_arrow_down.png differ
diff --git a/data/themes/ctxpopup_arrow_left.png b/data/themes/ctxpopup_arrow_left.png
new file mode 100644 (file)
index 0000000..5a9615f
Binary files /dev/null and b/data/themes/ctxpopup_arrow_left.png differ
diff --git a/data/themes/ctxpopup_arrow_right.png b/data/themes/ctxpopup_arrow_right.png
new file mode 100644 (file)
index 0000000..f33ee29
Binary files /dev/null and b/data/themes/ctxpopup_arrow_right.png differ
diff --git a/data/themes/ctxpopup_arrow_up.png b/data/themes/ctxpopup_arrow_up.png
new file mode 100644 (file)
index 0000000..7f4a279
Binary files /dev/null and b/data/themes/ctxpopup_arrow_up.png differ
index a866816..4bd1da5 100644 (file)
@@ -7477,7 +7477,7 @@ collections {
             scale: 1;
             description { state: "default" 0.0;
                align: 0.0 0.0;
-               rel2{ to:"clipper"; relative: 1.0 1.0;}
+               rel2{ to:"clipper"; relative: 1.0 1.0; }
             }
             description { state: "hidden" 0.0;
                visible: 0;
@@ -7557,7 +7557,7 @@ collections {
             scale: 1;
             description { state: "default" 0.0;
                align: 0.0 0.0;
-               rel2{ to:"clipper"; relative: 1.0 1.0;}
+               rel2{ to:"clipper"; relative: 1.0 1.0; }
             }
             description { state: "hidden" 0.0;
                visible: 0;
@@ -7631,7 +7631,7 @@ collections {
                set_int(sbvis_v, 0);
                set_int(sbvis_h, 0);
                set_int(sbalways_v, 0);
-                                   set_int(sbalways_h, 0);
+               set_int(sbalways_h, 0);
                set_int(sbvis_timer, 0);
             }
          }
@@ -7680,21 +7680,21 @@ collections {
          program { name: "sb_vbar_show";
             signal: "do-show-vbar";
             source: "";
-            action:  STATE_SET "default" 0.0;
+            action: STATE_SET "default" 0.0;
             transition: LINEAR 1.0;
             target: "sb_vbar_clip";
          }
          program { name: "sb_vbar_hide";
             signal: "do-hide-vbar";
             source: "";
-            action:  STATE_SET "hidden" 0.0;
+            action: STATE_SET "hidden" 0.0;
             transition: LINEAR 1.0;
             target: "sb_vbar_clip";
          }
          program { name: "hbar_show";
             signal: "elm,action,show,hbar";
             source: "elm";
-            action:  STATE_SET "default" 0.0;
+            action: STATE_SET "default" 0.0;
             target: "sb_hbar_clip_master";
          }
          program { name: "hbar_hide";
@@ -7736,14 +7736,14 @@ collections {
          program { name: "sb_hbar_show";
             signal: "do-show-hbar";
             source: "";
-            action:  STATE_SET "default" 0.0;
+            action: STATE_SET "default" 0.0;
             transition: LINEAR 1.0;
             target: "sb_hbar_clip";
          }
          program { name: "sb_hbar_hide";
             signal: "do-hide-hbar";
             source: "";
-            action:  STATE_SET "hidden" 0.0;
+            action: STATE_SET "hidden" 0.0;
             transition: LINEAR 1.0;
             target: "sb_hbar_clip";
          }
@@ -7834,7 +7834,7 @@ collections {
             mouse_events: 0;
             description { state: "default" 0.0;
                visible: 0;
-               min: 40 0;
+               min: 20 0;
                fixed: 1 1;
                align: 1 0.5;
                rel1 {
@@ -7851,7 +7851,7 @@ collections {
             mouse_events: 0;
             description { state: "default" 0.0;
                visible: 0;
-               min: 40 0;
+               min: 20 0;
                fixed: 1 1;
                align: 0 0.5;
                rel1 {
@@ -7868,7 +7868,7 @@ collections {
             mouse_events: 0;
             description { state: "default" 0.0;
                visible: 0;
-               min: 0 40;
+               min: 0 20;
                fixed: 1 1;
                align: 0.5 1;
                rel1 {
@@ -7885,7 +7885,7 @@ collections {
             mouse_events: 0;
             description { state: "default" 0.0;
                visible: 0;
-               min: 0 40;
+               min: 0 20;
                fixed: 1 1;
                align: 0.5 0;
                rel1 {
@@ -7906,9 +7906,8 @@ collections {
                y: 1 1 0;
                confine: "arrow_area_up";
             }
-            description {
-               state: "default" 0.0;
-               min: 40 40;
+            description { state: "default" 0.0;
+               min: 36 20;
                fixed: 1 1;
                visible: 1;
             }
@@ -7922,9 +7921,8 @@ collections {
                y: 1 1 0;
                confine: "arrow_area_down";
             }
-            description {
-               state: "default" 0.0;
-               min: 40 40;
+            description { state: "default" 0.0;
+               min: 36 20;
                fixed: 1 1;
                visible: 1;
             }
@@ -7938,9 +7936,8 @@ collections {
                y: 1 1 0;
                confine: "arrow_area_left";
             }
-            description {
-               state: "default" 0.0;
-               min: 40 40;
+            description { state: "default" 0.0;
+               min: 20 36;
                fixed: 1 1;
                visible: 1;
             }
@@ -7954,9 +7951,8 @@ collections {
                y: 1 1 0;
                confine: "arrow_area_right";
             }
-            description {
-               state: "default" 0.0;
-               min: 40 40;
+            description { state: "default" 0.0;
+               min: 20 36;
                fixed: 1 1;
                visible: 1;
             }
@@ -7995,8 +7991,8 @@ collections {
          part { name: "elm.swallow.content";
             type: SWALLOW;
             description { state: "default" 0.0;
-               rel1 { to:"base"; offset: 4 4; };
-               rel2 { to:"base"; offset: -5 -5; };
+               rel1 { to:"base"; offset: 4 4; }
+               rel2 { to:"base"; offset: -5 -5; }
             }
          }
       }
@@ -8004,10 +8000,10 @@ collections {
 ///////////////////////////////////////////////////////////////////////////////
    group { name: "elm/ctxpopup/arrow/default";
       images {
-         image: "icon_arrow_left.png" COMP;
-         image: "icon_arrow_right.png" COMP;
-         image: "icon_arrow_up.png" COMP;
-         image: "icon_arrow_down.png" COMP;
+         image: "ctxpopup_arrow_left.png" COMP;
+         image: "ctxpopup_arrow_right.png" COMP;
+         image: "ctxpopup_arrow_up.png" COMP;
+         image: "ctxpopup_arrow_down.png" COMP;
       }
       parts {
          part { name: "ctxpopup_arrow";
@@ -8015,39 +8011,43 @@ collections {
             scale: 1;
             description {
                state: "default" 0.0;
-               min: 40 40;
+               min: 36 36;
                fixed: 1 1;
                visible: 0;
                align: 0.5 0.5;
             }
             description {
                state: "left" 0.0;
-               min: 40 40;
+               min: 20 36;
                fixed: 1 1;
                align: 0.0 0.5;
-               image { normal: "icon_arrow_left.png";
-               }
+               rel1 { offset: 3 0; }
+               rel2 { offset: 2 -1; }
+               image { normal: "ctxpopup_arrow_left.png"; }
             }
             description { state: "right" 0.0;
-               min: 40 40;
+               min: 20 36;
                fixed: 1 1;
                align: 1.0 0.5;
-               image { normal: "icon_arrow_right.png";                
-                                       }
+               rel1 { offset: -5 0; }
+               rel2 { offset: -6 -1; }
+               image { normal: "ctxpopup_arrow_right.png"; }
             }
             description { state: "top" 0.0;
-               min: 40 40;
+               min: 36 20;
                fixed: 1 1;
                align: 0.5 0.0;
-               image { normal: "icon_arrow_up.png";
-               }
+               rel1 { offset: 0 5; }
+               rel2 { offset: -1 4; }
+               image { normal: "ctxpopup_arrow_up.png"; }
             }
             description { state: "bottom" 0.0;
-               min: 40 40;
+               min: 36 20;
                fixed: 1 1;
                align: 0.5 1.0;
-               image { normal: "icon_arrow_down.png";
-               }
+               rel1 { offset: 0 -5; }
+               rel2 { offset: -1 -6; }
+               image { normal: "ctxpopup_arrow_down.png"; }
             }
          }
       }
@@ -8081,8 +8081,8 @@ collections {
 ///////////////////////////////////////////////////////////////////////////////
    group {
       name: "elm/ctxpopup/icon_text_style_item/default";
-           alias: "elm/ctxpopup/text_style_item/default";
-           alias: "elm/ctxpopup/icon_style_item/default";
+        alias: "elm/ctxpopup/text_style_item/default";
+        alias: "elm/ctxpopup/icon_style_item/default";
       images {
          image: "hoversel_entry_bg.png" COMP;
       }
@@ -8110,19 +8110,21 @@ collections {
          }
          part { name: "elm.swallow.icon";
             type: SWALLOW;
+            clip_to: "disclip";
             scale: 1;
             description { state: "default" 0.0;
                min: 25 25;
-               max: 25 25;  
+               max: 25 25;
                align: 0 0.5;
                aspect: 1.0 1.0;
-               rel1 { offset: 10 10; }  
-               rel2 { offset: 0 -10; }
+               rel1 { offset: 10 10; }
+                                        rel2 { offset: 0 -10; }
             }
          }
          part { name: "elm.text";
             type: TEXT;
             mouse_events: 0;
+            clip_to: "disclip";
             scale: 1;
             description { state: "default" 0.0;
                min: 1 40;
@@ -8169,13 +8171,19 @@ collections {
          part { name: "disclip";
             type: RECT;
             description { state: "default" 0.0;
+               color: 255 255 255 255;
+            }
+            description { state: "enabled" 0.0;
+               color: 127 127 127 127;
+            }
+         }
+         part { name: "blocker";
+            description { state: "default" 0.0;
                visible: 0;
             }
             description { state: "enabled" 0.0;
                visible: 1;
-               color: 50 50 50 127;
-               rel1.offset: 4 4;
-               rel2.offset: -5 -5;
+               color: 0 0 0 0;
             }
          }
       }
@@ -8191,12 +8199,14 @@ collections {
             source: "elm";
             action: STATE_SET "enabled" 0.0;
             target: "disclip";
+            target: "blocker";
          }
          program { name: "enable";
             signal: "elm,state,enabled";
             source: "elm";
             action: STATE_SET "default" 0.0;
             target: "disclip";
+            target: "blocker";
          }
          program { name: "item_click2";
             signal: "mouse,down,1";
@@ -8210,7 +8220,7 @@ collections {
             signal: "mouse,up,1";
             source: "over2";
             script {
-                                        set_state(PART:"elm.text", "default", 0.0);
+               set_state(PART:"elm.text", "default", 0.0);
                set_state(PART:"bg", "default", 0.0);
             }
          }
index e451d6d..a14c7d6 100644 (file)
@@ -502,12 +502,15 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
          edje_object_part_swallow(wd->base, "elm.swallow.arrow_left", wd->arrow);
          if (base_size.h > 0)
            {
-              if (y < (arrow_size.h * 0.5) + base_size.y) y = 0;
-              else if (y > base_size.y + base_size.h - (arrow_size.h * 0.5)) y = base_size.h - arrow_size.h;
-              else y = y - base_size.y - (arrow_size.h * 0.5);
+              if (y < ((arrow_size.h * 0.5) + base_size.y))
+                y = 0;
+              else if (y > base_size.y + base_size.h - (arrow_size.h * 0.5))
+                y = base_size.h - arrow_size.h;
+              else
+                y = y - base_size.y - (arrow_size.h * 0.5);
               edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_left", 1,
                                               (double) (y) / (double) (base_size.h - arrow_size.h));
-          }
+           }
          break;
       case ELM_CTXPOPUP_DIRECTION_RIGHT:
          edje_object_signal_emit(wd->arrow, "elm,state,right", "elm");
@@ -519,8 +522,10 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
          edje_object_part_swallow(wd->base, "elm.swallow.arrow_right", wd->arrow);
          if (base_size.h > 0)
             {
-              if (y < (arrow_size.h * 0.5) + base_size.y) y = 0;
-              else if (y > base_size.y + base_size.h - (arrow_size.h * 0.5)) y = base_size.h - arrow_size.h;
+              if (y < (arrow_size.h * 0.5) + base_size.y)
+                y = 0;
+              else if (y > (base_size.y + base_size.h - (arrow_size.h * 0.5)))
+                y = base_size.h - arrow_size.h;
               else y = y - base_size.y - (arrow_size.h * 0.5);
               edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_right", 0,
                                               (double) (y) / (double) (base_size.h - arrow_size.h));
@@ -536,9 +541,12 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
          edje_object_part_swallow(wd->base, "elm.swallow.arrow_up", wd->arrow);
          if (base_size.w > 0)
            {
-              if (x < (arrow_size.w * 0.5) + base_size.x) x = 0;
-              else if (x > base_size.x + base_size.w - (arrow_size.w * 0.5)) x = base_size.w - arrow_size.w;
-              else x = x - base_size.x - (arrow_size.w * 0.5);
+              if (x < (arrow_size.w * 0.5) + base_size.x)
+                x = 0;
+              else if (x > (base_size.x + base_size.w - (arrow_size.w * 0.5)))
+                x = base_size.w - arrow_size.w;
+              else
+                x = x - base_size.x - (arrow_size.w * 0.5);
               edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_up",
                                               (double) (x) / (double) (base_size.w - arrow_size.w), 1);
            }
@@ -553,8 +561,10 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
          edje_object_part_swallow(wd->base, "elm.swallow.arrow_down", wd->arrow);
          if (base_size.w > 0)
            {
-              if (x < (arrow_size.w * 0.5) + base_size.x) x = 0;
-              else if (x > base_size.x + base_size.w - (arrow_size.w * 0.5)) x = base_size.w - arrow_size.w;
+              if (x < (arrow_size.w * 0.5) + base_size.x)
+                x = 0;
+              else if (x > (base_size.x + base_size.w - (arrow_size.w * 0.5)))
+                x = base_size.w - arrow_size.w;
               else x = x - base_size.x - (arrow_size.w * 0.5);
               edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_down",
                                               (double) (x) / (double) (base_size.w - arrow_size.w), 0);