From: Hyoyoung Chang Date: Thu, 30 Dec 2010 06:48:30 +0000 (+0900) Subject: add disabling cover for grid item X-Git-Tag: 2.0_alpha~171 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=109a47889333f5500545b45df6969276c4ac7dce;p=framework%2Fuifw%2Fcbhm.git add disabling cover for grid item --- diff --git a/data/themes/extstyles.edc b/data/themes/extstyles.edc index d8f53c0..fae41d7 100644 --- a/data/themes/extstyles.edc +++ b/data/themes/extstyles.edc @@ -319,12 +319,30 @@ group normal: "clipboard_button_delete.png"; } } - description { state: "pressed" 0.0; + description { + state: "pressed" 0.0; inherit: "default" 0.0; image { normal: "clipboard_button_delete_press.png"; } } + description { + state: "hide" 0.0; + rel1.to: "delbtn"; + rel2.to: "delbtn"; + visible: 0; + } + } + part { + name: "elm.swallow.cover"; + type: SWALLOW; + scale: 1; + mouse_events: 0; + description { + state: "default" 0.0; + rel1.to: "cliprect"; + rel2.to: "cliprect"; + } } // part } // parts programs @@ -366,6 +384,14 @@ group source: "delbtn/img"; action: SIGNAL_EMIT "elm,action,click" ""; } + program { + name: "hide_delbtn"; + source: "elm"; + signal: "elm,state,hide,delbtn"; + script { + set_state(PART:"delbtn/img", "hide", 0.0); + } + } } //programs } //group diff --git a/src/clipdrawer.c b/src/clipdrawer.c index 9e9e8ce..cf286f8 100644 --- a/src/clipdrawer.c +++ b/src/clipdrawer.c @@ -249,7 +249,9 @@ Evas_Object* _grid_icon_get(const void *data, Evas_Object *obj, const char *part { Evas_Object *layout = elm_layout_add (obj); elm_layout_theme_set(layout, "gengrid", "widestyle", "horizontal_layout"); - edje_object_signal_callback_add(elm_layout_edje_get(layout), "mouse,up,1", "*", _grid_item_ly_clicked, data); + edje_object_signal_callback_add(elm_layout_edje_get(layout), + "mouse,up,1", "*", _grid_item_ly_clicked, data); + Evas_Object *sicon; sicon = evas_object_image_add(evas_object_evas_get(obj)); evas_object_image_load_size_set(sicon, GRID_ITEM_SINGLE_W, GRID_ITEM_SINGLE_H); @@ -258,6 +260,16 @@ Evas_Object* _grid_icon_get(const void *data, Evas_Object *obj, const char *part evas_object_resize(sicon, GRID_ITEM_SINGLE_W, GRID_ITEM_SINGLE_H); elm_layout_content_set(layout, "elm.swallow.icon", sicon); +/* +// edje_object_signal_emit(elm_layout_edje_get(layout), "elm,state,hide,delbtn", "elm"); + + Evas_Object *rect = evas_object_rectangle_add(evas_object_evas_get(obj)); +// evas_object_resize(rect, GRID_ITEM_W, GRID_ITEM_H); + evas_object_color_set(rect, 0, 0, 0, 200); + evas_object_show(rect); + elm_layout_content_set(layout, "elm.swallow.cover", rect); +*/ + return layout; /* @@ -502,7 +514,7 @@ int clipdrawer_create_view(void *data) // for debug // at starting, showing app view - // clipdrawer_activate_view(ad); + clipdrawer_activate_view(ad); return 0; }