rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=4015e0fc25f89e2a6d32e4c9d2eee9604af5a0c1

commit 4015e0fc25f89e2a6d32e4c9d2eee9604af5a0c1
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Fri Jul 17 16:08:51 2015 +0300

    Property: don't show the color selector if control 'color' is disabled
    
    Change-Id: Id66501e2ef41a130397559a75fedc68e696836c0
---
 data/themes/default/widgets/layouts/property.edc | 41 ++++++++----------------
 src/bin/ui/blocks/property_macros.h              |  6 ++--
 2 files changed, 16 insertions(+), 31 deletions(-)

diff --git a/data/themes/default/widgets/layouts/property.edc 
b/data/themes/default/widgets/layouts/property.edc
index fdeee56..a0f3bb7 100644
--- a/data/themes/default/widgets/layouts/property.edc
+++ b/data/themes/default/widgets/layouts/property.edc
@@ -1098,6 +1098,7 @@ group { name: "elm/layout/property/color";
       }
       part { name: "shadow";
          type: IMAGE;
+         repeat_events: 1;
          description { state: "default" 0.0;
             rel1 {
                to: "base";
@@ -1112,43 +1113,22 @@ group { name: "elm/layout/property/color";
             }
          }
       }
-      part { name: "elm.text";
-         type: TEXT;
+      part { name: "event";
+         type: RECT;
          description { state: "default" 0.0;
-            align: 0.0 0.5;
-            color: LIGHT_GREY_FONT_COLOR;
+            color: 0 0 0 0;
             rel1 {
-               relative: 1.0 0.0;
-               offset: 3 0;
                to: "base";
             }
             rel2 {
-               to_y: "base";
-            }
-            text {
-               font: PT;
-               size: 12;
-               max: 1 0;
+               to: "base";
             }
          }
          description { state: "disabled" 0.0;
             visible: 0;
-            align: 0.0 0.5;
-            rel1 {
-               relative: 1.0 0.0;
-               offset: 3 0;
-               to: "base";
-            }
-            rel2 {
-               to_y: "base";
-            }
-            text {
-               font: PT;
-               size: 12;
-               max: 1 0;
-            }
          }
       }
+
    }
    programs {
       program { name: "enabled";
@@ -1156,14 +1136,19 @@ group { name: "elm/layout/property/color";
          source: "elm";
          action: STATE_SET "default" 0.00;
          target: "disabler";
-         target: "elm.text";
+         target: "event";
       }
       program { name: "disabled";
          signal: "elm,state,disabled";
          source: "elm";
          action: STATE_SET "disabled" 0.00;
          target: "disabler";
-         target: "elm.text";
+         target: "event";
+      }
+      program { name: "clicked";
+         signal: "mouse,clicked,1";
+         source: "event";
+         action: SIGNAL_EMIT "clicked" "eflete";
       }
    }
 }
diff --git a/src/bin/ui/blocks/property_macros.h 
b/src/bin/ui/blocks/property_macros.h
index 71ebf62..68065b8 100644
--- a/src/bin/ui/blocks/property_macros.h
+++ b/src/bin/ui/blocks/property_macros.h
@@ -1724,7 +1724,7 @@ prop_##SUB##_##VALUE##_add(Evas_Object *parent, \
    if (TOOLTIP) elm_object_tooltip_text_set(pd->MEMBER.VALUE, TOOLTIP); \
    pd->MEMBER.VALUE##_obj = elm_layout_add(parent); \
    elm_layout_theme_set(pd->MEMBER.VALUE##_obj, "image", "color", 
"color_set"); \
-   evas_object_event_callback_add(pd->MEMBER.VALUE, EVAS_CALLBACK_MOUSE_DOWN, \
+   elm_layout_signal_callback_add(pd->MEMBER.VALUE, "clicked", "eflete", \
                                   _on_##MEMBER##_##VALUE##_clicked, pd); \
    elm_layout_content_set(pd->MEMBER.VALUE, NULL, pd->MEMBER.VALUE##_obj); \
    elm_layout_content_set(item, NULL, pd->MEMBER.VALUE); \
@@ -1806,9 +1806,9 @@ _on_##MEMBER##_##VALUE##_dismissed(void *data, \
 } \
 static void \
 _on_##MEMBER##_##VALUE##_clicked(void *data, \
-                                 Evas *e __UNUSED__, \
                                  Evas_Object *obj, \
-                                 void *event_info __UNUSED__) \
+                                 const char *emission __UNUSED__, \
+                                 const char *source __UNUSED__) \
 { \
    int x, y; \
    int r, g, b, a; \

-- 


Reply via email to