summaryrefslogtreecommitdiff
path: root/legacy/elementary
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-09-10 18:48:32 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-09-10 18:49:12 +0900
commit81f15c10865d7c7192a128cf431d31517b6cfacb (patch)
tree528a0acdf34d6a4845ec8b6097c0a1d9a796a8ce /legacy/elementary
parenta86577f05153194b7e16dc9ebcea5088835e5b17 (diff)
panel - really should support finger size for the open/close tab! add!
Diffstat (limited to 'legacy/elementary')
-rw-r--r--legacy/elementary/src/lib/elm_panel.c33
-rw-r--r--legacy/elementary/src/lib/elm_widget_panel.h3
2 files changed, 31 insertions, 5 deletions
diff --git a/legacy/elementary/src/lib/elm_panel.c b/legacy/elementary/src/lib/elm_panel.c
index 3c74dab2f4..13f4051ab4 100644
--- a/legacy/elementary/src/lib/elm_panel.c
+++ b/legacy/elementary/src/lib/elm_panel.c
@@ -121,10 +121,12 @@ _orient_set_do(Evas_Object *obj)
121} 121}
122 122
123static void 123static void
124_elm_panel_smart_theme(Eo *obj, void *_pd EINA_UNUSED, va_list *list) 124_elm_panel_smart_theme(Eo *obj, void *_pd, va_list *list)
125{ 125{
126 const char *str; 126 const char *str;
127 127 Evas_Coord minw = 0, minh = 0;
128 Elm_Panel_Smart_Data *sd = _pd;
129
128 Eina_Bool int_ret = EINA_FALSE; 130 Eina_Bool int_ret = EINA_FALSE;
129 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 131 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
130 if (ret) *ret = EINA_FALSE; 132 if (ret) *ret = EINA_FALSE;
@@ -144,7 +146,15 @@ _elm_panel_smart_theme(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
144 elm_widget_highlight_in_theme_set(obj, EINA_FALSE); 146 elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
145 147
146 _orient_set_do(obj); 148 _orient_set_do(obj);
147 149
150 evas_object_hide(sd->event);
151 elm_coords_finger_size_adjust(1, &minw, 1, &minh);
152 evas_object_size_hint_min_set(sd->event, minw, minh);
153
154 if (edje_object_part_exists
155 (wd->resize_obj, "elm.swallow.event"))
156 elm_layout_content_set(obj, "elm.swallow.event", sd->event);
157
148 elm_layout_sizing_eval(obj); 158 elm_layout_sizing_eval(obj);
149 159
150 if (ret) *ret = EINA_TRUE; 160 if (ret) *ret = EINA_TRUE;
@@ -342,7 +352,8 @@ static void
342_elm_panel_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) 352_elm_panel_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
343{ 353{
344 Elm_Panel_Smart_Data *priv = _pd; 354 Elm_Panel_Smart_Data *priv = _pd;
345 355 Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
356
346 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 357 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
347 358
348 elm_widget_sub_object_add(eo_parent_get(obj), obj); 359 elm_widget_sub_object_add(eo_parent_get(obj), obj);
@@ -366,6 +377,20 @@ _elm_panel_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
366 377
367 _mirrored_set(obj, elm_widget_mirrored_get(obj)); 378 _mirrored_set(obj, elm_widget_mirrored_get(obj));
368 379
380 priv->event = evas_object_rectangle_add(evas_object_evas_get(obj));
381 evas_object_color_set(priv->event, 0, 0, 0, 0);
382 evas_object_pass_events_set(priv->event, EINA_TRUE);
383 if (edje_object_part_exists
384 (wd->resize_obj, "elm.swallow.event"))
385 {
386 Evas_Coord minw = 0, minh = 0;
387
388 elm_coords_finger_size_adjust(1, &minw, 1, &minh);
389 evas_object_size_hint_min_set(priv->event, minw, minh);
390 elm_layout_content_set(obj, "elm.swallow.event", priv->event);
391 }
392 elm_widget_sub_object_add(obj, priv->event);
393
369 elm_layout_sizing_eval(obj); 394 elm_layout_sizing_eval(obj);
370} 395}
371 396
diff --git a/legacy/elementary/src/lib/elm_widget_panel.h b/legacy/elementary/src/lib/elm_widget_panel.h
index 281016911b..2d09224fa8 100644
--- a/legacy/elementary/src/lib/elm_widget_panel.h
+++ b/legacy/elementary/src/lib/elm_widget_panel.h
@@ -22,7 +22,8 @@ typedef struct _Elm_Panel_Smart_Data Elm_Panel_Smart_Data;
22struct _Elm_Panel_Smart_Data 22struct _Elm_Panel_Smart_Data
23{ 23{
24 Evas_Object *bx, *content; 24 Evas_Object *bx, *content;
25 25 Evas_Object *event;
26
26 Elm_Panel_Orient orient; 27 Elm_Panel_Orient orient;
27 28
28 Eina_Bool hidden : 1; 29 Eina_Bool hidden : 1;