hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=559131729d93472a99a67e1a702c2a0a54192a27

commit 559131729d93472a99a67e1a702c2a0a54192a27
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Fri Aug 15 19:34:57 2014 +0900

    live_edit: revise theme.
---
 data/themes/default/images.edc                     |  32 ++--
 data/themes/default/images/Makefile.am             |  11 +-
 .../bg_glow_in.png => live_bg_glow_in.png}         | Bin
 .../icon-live-edit.png => live_edit.png}           | Bin
 .../images/live_edit_icons/rel1.dragable.png       | Bin 162 -> 0 bytes
 .../images/live_edit_icons/rel2.dragable.png       | Bin 158 -> 0 bytes
 .../icon-image.png => live_image.png}              | Bin
 .../icon-rectangle.png => live_rectangle.png}      | Bin
 data/themes/default/images/live_rel1_dragable.png  | Bin 0 -> 195 bytes
 data/themes/default/images/live_rel2_dragable.png  | Bin 0 -> 195 bytes
 .../icon-spacer.png => live_spacer.png}            | Bin
 .../icon-swallow.png => live_swallow.png}          | Bin
 .../icon-text.png => live_text.png}                | Bin
 .../icon-textblock.png => live_textblock.png}      | Bin
 data/themes/default/layout_common.edc              | 169 ++++++++++-----------
 src/bin/live_edit.c                                |  34 ++---
 16 files changed, 125 insertions(+), 121 deletions(-)

diff --git a/data/themes/default/images.edc b/data/themes/default/images.edc
index bf199e7..ac8ca4a 100644
--- a/data/themes/default/images.edc
+++ b/data/themes/default/images.edc
@@ -9,13 +9,13 @@ images {
    image: "status.png" COMP;
    image: "swallow_s.png" COMP;
    image: "goto.png" COMP;
-   image: "live_edit_icons/icon-image.png" COMP;
-   image: "live_edit_icons/icon-rectangle.png" COMP;
-   image: "live_edit_icons/icon-swallow.png" COMP;
-   image: "live_edit_icons/icon-spacer.png" COMP;
-   image: "live_edit_icons/icon-text.png" COMP;
-   image: "live_edit_icons/icon-textblock.png" COMP;
-   image: "live_edit_icons/icon-live-edit.png" COMP;
+   image: "live_image.png" COMP;
+   image: "live_rectangle.png" COMP;
+   image: "live_swallow.png" COMP;
+   image: "live_spacer.png" COMP;
+   image: "live_text.png" COMP;
+   image: "live_textblock.png" COMP;
+   image: "live_edit.png" COMP;
 }
 
 group { name: "line";
@@ -128,12 +128,12 @@ group { name: "minus";
    }
 }
 
-group { name: "live-edit";
+group { name: "live_edit";
    parts {
       part { name: "img";
          type: IMAGE;
          description { state: "default" 0.0;
-            image.normal: "live_edit_icons/icon-live-edit.png";
+            image.normal: "live_edit.png";
          }
       }
    }
@@ -145,18 +145,16 @@ group { name: "live-edit";
          part { name: "img"; \
             description { state: "default" 0.0; \
                image.normal: _image_path; \
-               min: 10 10; \
-               max: 10 10; \
             } \
          } \
       } \
    }
 
-ADD_LIVE_EDIT_ICON_GROUP("IMAGE", "live_edit_icons/icon-image.png")
-ADD_LIVE_EDIT_ICON_GROUP("RECT", "live_edit_icons/icon-rectangle.png")
-ADD_LIVE_EDIT_ICON_GROUP("SPACER", "live_edit_icons/icon-spacer.png")
-ADD_LIVE_EDIT_ICON_GROUP("SWALLOW", "live_edit_icons/icon-swallow.png")
-ADD_LIVE_EDIT_ICON_GROUP("TEXT", "live_edit_icons/icon-text.png")
-ADD_LIVE_EDIT_ICON_GROUP("TEXTBLOCK", "live_edit_icons/icon-textblock.png")
+ADD_LIVE_EDIT_ICON_GROUP("IMAGE", "live_image.png")
+ADD_LIVE_EDIT_ICON_GROUP("RECT", "live_rectangle.png")
+ADD_LIVE_EDIT_ICON_GROUP("SPACER", "live_spacer.png")
+ADD_LIVE_EDIT_ICON_GROUP("SWALLOW", "live_swallow.png")
+ADD_LIVE_EDIT_ICON_GROUP("TEXT", "live_text.png")
+ADD_LIVE_EDIT_ICON_GROUP("TEXTBLOCK", "live_textblock.png")
 
 #undef ADD_LIVE_EDIT_ICON_GROUP
diff --git a/data/themes/default/images/Makefile.am 
b/data/themes/default/images/Makefile.am
index 0e31028..8c22e20 100644
--- a/data/themes/default/images/Makefile.am
+++ b/data/themes/default/images/Makefile.am
@@ -56,4 +56,13 @@ EXTRA_DIST = \
    downlight_glow_right.png \
    alarm_highlight.png \
    disabler.png \
-   swallow_spacer_mask.png
+   live_bg_glow_in.png \
+   live_rel1_dragable.png \
+   live_rel2_dragable.png \
+   live_image.png \
+   live_rectangle.png \
+   live_swallow.png \
+   live_spacer.png \
+   live_text.png \
+   live_textblock.png \
+   live_edit.png
diff --git a/data/themes/default/images/live_edit_icons/bg_glow_in.png 
b/data/themes/default/images/live_bg_glow_in.png
similarity index 100%
rename from data/themes/default/images/live_edit_icons/bg_glow_in.png
rename to data/themes/default/images/live_bg_glow_in.png
diff --git a/data/themes/default/images/live_edit_icons/icon-live-edit.png 
b/data/themes/default/images/live_edit.png
similarity index 100%
rename from data/themes/default/images/live_edit_icons/icon-live-edit.png
rename to data/themes/default/images/live_edit.png
diff --git a/data/themes/default/images/live_edit_icons/rel1.dragable.png 
b/data/themes/default/images/live_edit_icons/rel1.dragable.png
deleted file mode 100644
index 59341a6..0000000
Binary files a/data/themes/default/images/live_edit_icons/rel1.dragable.png and 
/dev/null differ
diff --git a/data/themes/default/images/live_edit_icons/rel2.dragable.png 
b/data/themes/default/images/live_edit_icons/rel2.dragable.png
deleted file mode 100644
index 5e19305..0000000
Binary files a/data/themes/default/images/live_edit_icons/rel2.dragable.png and 
/dev/null differ
diff --git a/data/themes/default/images/live_edit_icons/icon-image.png 
b/data/themes/default/images/live_image.png
similarity index 100%
rename from data/themes/default/images/live_edit_icons/icon-image.png
rename to data/themes/default/images/live_image.png
diff --git a/data/themes/default/images/live_edit_icons/icon-rectangle.png 
b/data/themes/default/images/live_rectangle.png
similarity index 100%
rename from data/themes/default/images/live_edit_icons/icon-rectangle.png
rename to data/themes/default/images/live_rectangle.png
diff --git a/data/themes/default/images/live_rel1_dragable.png 
b/data/themes/default/images/live_rel1_dragable.png
new file mode 100644
index 0000000..46e9588
Binary files /dev/null and b/data/themes/default/images/live_rel1_dragable.png 
differ
diff --git a/data/themes/default/images/live_rel2_dragable.png 
b/data/themes/default/images/live_rel2_dragable.png
new file mode 100644
index 0000000..116a294
Binary files /dev/null and b/data/themes/default/images/live_rel2_dragable.png 
differ
diff --git a/data/themes/default/images/live_edit_icons/icon-spacer.png 
b/data/themes/default/images/live_spacer.png
similarity index 100%
rename from data/themes/default/images/live_edit_icons/icon-spacer.png
rename to data/themes/default/images/live_spacer.png
diff --git a/data/themes/default/images/live_edit_icons/icon-swallow.png 
b/data/themes/default/images/live_swallow.png
similarity index 100%
rename from data/themes/default/images/live_edit_icons/icon-swallow.png
rename to data/themes/default/images/live_swallow.png
diff --git a/data/themes/default/images/live_edit_icons/icon-text.png 
b/data/themes/default/images/live_text.png
similarity index 100%
rename from data/themes/default/images/live_edit_icons/icon-text.png
rename to data/themes/default/images/live_text.png
diff --git a/data/themes/default/images/live_edit_icons/icon-textblock.png 
b/data/themes/default/images/live_textblock.png
similarity index 100%
rename from data/themes/default/images/live_edit_icons/icon-textblock.png
rename to data/themes/default/images/live_textblock.png
diff --git a/data/themes/default/layout_common.edc 
b/data/themes/default/layout_common.edc
index 913daf4..50d261d 100644
--- a/data/themes/default/layout_common.edc
+++ b/data/themes/default/layout_common.edc
@@ -7,14 +7,14 @@ images {
    image: "shine.png" COMP;
    image: "bub_over_bot.png" COMP;
    image: "disabler.png" COMP;
-   image: "live_edit_icons/rel1.dragable.png" COMP;
-   image: "live_edit_icons/rel2.dragable.png" COMP;
-   image: "live_edit_icons/bg_glow_in.png" COMP;
+   image: "live_rel1_dragable.png" COMP;
+   image: "live_rel2_dragable.png" COMP;
+   image: "live_bg_glow_in.png" COMP;
 }
 
 styles {
      style { name: "entry_live_edit_style";
-        base: "font="FN" font_size=11 text_class=entry color=#ffffff 
style=shadow,bottom shadow_color=#00000080 glow_color=#3399ff18 valign=1 
ellipsis=1.0 wrap=none";
+        base: "font="FN" font_size=10 text_class=entry color=#3399ff 
style=glow glow_color=#3399ff18 valign=1 ellipsis=1.0 wrap=none";
      }
 }
 
@@ -1301,133 +1301,140 @@ group { name: "search_layout";
    }
 }
 
-#define BG_COLOR 255 255 255
-#define BORDER_COLOR 220 250 255
-#define REL_SIZE 70 35
-#define INFO_SIZE 130 50
-
 group { name: "live_edit_layout";
    parts {
-      part { name: "bg";
+      part { name: "base";
+         type: SPACER;
+         description { state: "default" 0.0;
+         }
+      }
+      part { name: "clipper";
          type: RECT;
          description { state: "default" 0.0;
-            color: 255 255 255 0;
+            color: 0 0 0 0;
          }
          description { state: "show" 0.0;
-            color: 255 255 255 30;
+            color: 255 255 255 255;
          }
       }
-      part { name: "new_part_bg";
+      part { name: "elm.swallow.symbol";
          type: SWALLOW;
          scale: 1;
+         clip_to: "clipper";
          description { state: "default" 0.0;
-            color: BG_COLOR 0;
-            rel1.to: "rel1.dragable";
-            rel2.to: "rel2.dragable";
-         }
-         description { state: "show" 0.0;
-            inherit:"default" 0.0;
-            color: BG_COLOR 240;
+            rel1.to: "rel1_dragable";
+            rel2.to: "rel2_dragable";
          }
       }
-      part { name: "new_part_bg_decorations";
+      part { name: "symbol_frame";
          scale: 1;
-         repeat_events: 1;
+         mouse_events: 0;
+         clip_to: "clipper";
          description { state: "default" 0.0;
-            image.normal: "live_edit_icons/bg_glow_in.png";
+            image.normal: "live_bg_glow_in.png";
             image.border: 1 1 1 1;
-            rel1.to: "new_part_bg";
-            rel2.to: "new_part_bg";
-            color: BORDER_COLOR 0;
-         }
-         description { state: "show" 0.0;
-            inherit:"default" 0.0;
-            color: BORDER_COLOR 255;
+            rel1.to: "elm.swallow.symbol";
+            rel2.to: "elm.swallow.symbol";
          }
       }
-      part { name: "rel1.dragable";
+      part { name: "rel1_dragable";
          scale: 1;
+         clip_to: "clipper";
          description { state: "default" 0.0;
-            image.normal: "live_edit_icons/rel1.dragable.png";
+            image.normal: "live_rel1_dragable.png";
             image.border: 3 3 3 3;
-            min: REL_SIZE;
-            max: REL_SIZE;
-            color: BORDER_COLOR 0;
-         }
-         description { state: "show" 0.0;
-            inherit:"default" 0.0;
-            color: BORDER_COLOR 255;
+            min: 70 35;
+            max: 70 35;
          }
          dragable {
-            confine: "bg";
+            confine: "base";
             x: 1 1 0;
             y: 1 1 0;
          }
       }
-      part { name: "elm.text.live_edit.rel1";
-         type: TEXTBLOCK;
+      part { name: "elm.text.rel1";
+         type: TEXT;
+         effect: GLOW;
          scale: 1;
-         repeat_events: 1;
+         mouse_events: 0;
          description {
-            text.style: "entry_live_edit_style";
-            rel1.to: "rel1.dragable";
-            rel2.to: "rel1.dragable";
+            rel1.to: "rel1_dragable";
+            rel2.to: "rel1_dragable";
+            color: 51 153 255 255;
+            color2: 51 153 255 24;
+            color3: 51 153 255 18;
+            align: 0 0.5;
+            fixed: 1 1;
+            text {
+               font: FN;
+               size: 10;
+               align: 0 0.5;
+               min: 1 0;
+               ellipsis: -1;
+            }
          }
       }
-      part { name: "rel2.dragable";
+      part { name: "rel2_dragable";
          scale: 1;
+         clip_to: "clipper";
          description { state: "default" 0.0;
-            image.normal: "live_edit_icons/rel2.dragable.png";
+            image.normal: "live_rel2_dragable.png";
             image.border: 3 3 3 3;
-            min: REL_SIZE;
-            max: REL_SIZE;
-            color: BORDER_COLOR 0;
-         }
-         description { state: "show" 0.0;
-            inherit:"default" 0.0;
-            color: BORDER_COLOR 255;
+            min: 70 35;
+            max: 70 35;
          }
          dragable {
-            confine: "bg";
+            confine: "base";
             x: 1 1 0;
             y: 1 1 0;
          }
       }
-      part { name: "elm.text.live_edit.rel2";
-         type: TEXTBLOCK;
+      part { name: "elm.text.rel2";
+         type: TEXT;
+         effect: GLOW;
          scale: 1;
-         repeat_events: 1;
+         mouse_events: 0;
          description {
-            text.style: "entry_live_edit_style";
-            rel1.to: "rel2.dragable";
-            rel2.to: "rel2.dragable";
+            rel1.to: "rel2_dragable";
+            rel2.to: "rel2_dragable";
+            color: 51 153 255 255;
+            color2: 51 153 255 24;
+            color3: 51 153 255 18;
+            align: 1 0.5;
+            text {
+               font: FN;
+               size: 10;
+               align: 1 0.5;
+               min: 1 0;
+               ellipsis: -1;
+            }
          }
       }
       part { name: "info_bg";
+         type: RECT;
          scale: 1;
-         repeat_events: 1;
+         mouse_events: 0;
          description { state: "default" 0.0;
-            image.normal: "live_edit_icons/rel2.dragable.png";
-            image.border: 3 3 3 3;
-            min: INFO_SIZE;
-            max: INFO_SIZE;
-            color: BORDER_COLOR 0;
-            align: 1.0 1.0;
+            rel1.to: "elm.swallow.symbol";
+            rel2.to: "elm.swallow.symbol";
+            min: 130 50;
+            max: 130 50;
+            fixed: 1 1;
+            color: 0 0 0 0;
          }
          description { state: "show" 0.0;
             inherit:"default" 0.0;
-            color: BORDER_COLOR 122;
+            color: 0 0 0 175;
          }
       }
-      part { name: "elm.text.live_edit.new_part_info";
+      part { name: "elm.text.info";
          type: TEXTBLOCK;
          scale: 1;
-         repeat_events: 1;
+         mouse_events: 0;
          description {
             text.style: "entry_live_edit_style";
             rel1.to: "info_bg";
             rel2.to: "info_bg";
-            color: 255 255 255 120;
          }
       }
    }
@@ -1436,31 +1443,23 @@ group { name: "live_edit_layout";
          signal: "load";
          source: "";
          script {
-            set_drag(PART:"rel1.dragable", 0.2, 0.2);
-            set_drag(PART:"rel2.dragable", 0.8, 0.8);
+            set_drag(PART:"rel1_dragable", 0.2, 0.2);
+            set_drag(PART:"rel2_dragable", 0.8, 0.8);
          }
          after: "on_load_show";
       }
       program { name: "on_load_show";
          action: STATE_SET "show" 0.0;
-         target: "bg";
-         target: "new_part_bg_decorations";
-         target: "new_part_bg";
-         target: "rel1.dragable";
-         target: "rel2.dragable";
+         target: "clipper";
          target: "info_bg";
          transition: DECELERATE 0.25;
          after: "emit_drag_signal";
       }
       program { name: "emit_drag_signal";
-         action: SIGNAL_EMIT "drag" "rel2.dragable";
+         action: SIGNAL_EMIT "drag" "rel2_dragable";
       }
    }
 }
-#undef BG_COLOR
-#undef BORDER_COLOR
-#undef REL_SIZE
-#undef INFO_SIZE
 
 group { name: "viewer_layout";
    parts {
diff --git a/src/bin/live_edit.c b/src/bin/live_edit.c
index 061dba8..cdfd40e 100644
--- a/src/bin/live_edit.c
+++ b/src/bin/live_edit.c
@@ -55,7 +55,7 @@ cur_part_value_update(live_data *ld, Evas_Object *edje)
    Evas_Coord view_w, view_h;
 
    config_view_size_get(&view_w, &view_h);
-   edje_object_part_geometry_get(edje, "new_part_bg", &x, &y, &w, &h);
+   edje_object_part_geometry_get(edje, "elm.swallow.symbol", &x, &y, &w, &h);
 
    ld->cur_part_data->rel1_x = ((float) x) / ((float) view_w);
    ld->cur_part_data->rel1_y = ((float) y) / ((float) view_h);
@@ -94,17 +94,15 @@ part_info_update(live_data *ld)
             ld->cur_part_data->x, ld->cur_part_data->y,
             ld->cur_part_data->w, ld->cur_part_data->h);
    edje_object_part_text_set(layout,
-                             "elm.text.live_edit.new_part_info", part_info);
+                             "elm.text.info", part_info);
    snprintf(part_info,
             LIVE_EDIT_NEW_PART_REL_STR_MAX_LEN, LIVE_EDIT_NEW_PART_REL_STR,
             ld->cur_part_data->rel1_x, ld->cur_part_data->rel1_y);
-   edje_object_part_text_set(layout,
-                             "elm.text.live_edit.rel1", part_info);
+   edje_object_part_text_set(layout, "elm.text.rel1", part_info);
    snprintf(part_info,
             LIVE_EDIT_NEW_PART_REL_STR_MAX_LEN, LIVE_EDIT_NEW_PART_REL_STR,
             ld->cur_part_data->rel2_x, ld->cur_part_data->rel2_y);
-   edje_object_part_text_set(layout,
-                             "elm.text.live_edit.rel2", part_info);
+   edje_object_part_text_set(layout, "elm.text.rel2", part_info);
 }
 
 static void
@@ -139,9 +137,9 @@ new_part_mouse_move_cb(void *data, Evas *e EINA_UNUSED,
         double dy = ((float) cur_y / (float) view_h) -
            ld->cur_part_data->rel1_y;
         edje_object_part_drag_step(elm_layout_edje_get(ld->layout),
-                                   "rel1.dragable", dx, dy);
+                                   "rel1_dragable", dx, dy);
         edje_object_part_drag_step(elm_layout_edje_get(ld->layout),
-                                   "rel2.dragable", dx, dy);
+                                   "rel2_dragable", dx, dy);
         part_info_update(ld);
      }
 }
@@ -167,14 +165,14 @@ new_part_mouse_up_cb(void *data EINA_UNUSED,
 }
 
 static void
-new_part_bg_set(live_data *ld)
+symbol_set(live_data *ld)
 {
    char buf[PATH_MAX];
    snprintf(buf, sizeof(buf), "%s_bg",
             MENU_ITEMS[ld->cur_part_data->type].name);
    Evas_Object *bg_layout = elm_layout_add(ld->layout);
    elm_layout_file_set(bg_layout, EDJE_PATH, buf);
-   elm_object_part_content_set(ld->layout, "new_part_bg", bg_layout);
+   elm_object_part_content_set(ld->layout, "elm.swallow.symbol", bg_layout);
 }
 
 static void
@@ -219,25 +217,25 @@ live_edit_layer_set(live_data *ld)
    Evas_Object *layout = create_live_edit_layout();
 
    edje_object_signal_callback_add(elm_layout_edje_get(layout),
-                                   "drag", "rel1.dragable",
+                                   "drag", "rel1_dragable",
                                    dragable_geometry_changed_cb, ld);
    edje_object_signal_callback_add(elm_layout_edje_get(layout),
-                                   "drag", "rel2.dragable",
+                                   "drag", "rel2_dragable",
                                    dragable_geometry_changed_cb, ld);
    edje_object_signal_callback_add(elm_layout_edje_get(layout),
-                                   "mouse,down,1", "new_part_bg",
+                                   "mouse,down,1", "elm.swallow.symbol",
                                    new_part_mouse_down_cb, ld);
    edje_object_signal_callback_add(elm_layout_edje_get(layout),
-                                   "mouse,up,1", "new_part_bg",
+                                   "mouse,up,1", "elm.swallow.symbol",
                                    new_part_mouse_up_cb, ld);
-   elm_layout_part_cursor_set(layout, "new_part_bg",
+   elm_layout_part_cursor_set(layout, "elm.swallow.symbol",
                               ELM_CURSOR_FLEUR);
-   elm_layout_part_cursor_set(layout, "rel1.dragable",
+   elm_layout_part_cursor_set(layout, "rel1_dragable",
                               ELM_CURSOR_TOP_LEFT_CORNER);
-   elm_layout_part_cursor_set(layout, "rel2.dragable",
+   elm_layout_part_cursor_set(layout, "rel2_dragable",
                               ELM_CURSOR_BOTTOM_RIGHT_CORNER);
    ld->layout = layout;
-   new_part_bg_set(ld);
+   symbol_set(ld);
    part_info_update(ld);
 }
 

-- 


Reply via email to