summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-11-28 19:24:26 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-11-28 19:24:26 +0900
commit8c24b5a87b100253f4fbf759e8df9a792addf7ac (patch)
treec05e5a760c98367e2023864ca0aaf1ad1577fdb0 /src
parentd777b1e21e65df140b4f38ebb328502cde013ea7 (diff)
elm - diskselector - fix min height to at least be min height of items
diskselector needs a major rewrite effort, BUT... until that happens this fixes minbimum height and that fixes T506
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_diskselector.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c
index be5eb4421..978a0cfa3 100644
--- a/src/lib/elm_diskselector.c
+++ b/src/lib/elm_diskselector.c
@@ -292,13 +292,20 @@ _resize_cb(void *data __UNUSED__,
292 Evas_Object *obj, 292 Evas_Object *obj,
293 void *event_info __UNUSED__) 293 void *event_info __UNUSED__)
294{ 294{
295 Evas_Coord w, h; 295 Evas_Coord w, h, vw = 0, vh = 0, mw = 0, mh = 0;
296 ELM_DISKSELECTOR_DATA_GET(obj, sd); 296 ELM_DISKSELECTOR_DATA_GET(obj, sd);
297 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 297 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
298 298
299 if ((sd->minw == -1) && (sd->minh == -1)) 299 if ((sd->minw == -1) && (sd->minh == -1))
300 elm_coords_finger_size_adjust(6, &sd->minw, 1, &sd->minh); 300 elm_coords_finger_size_adjust(6, &sd->minw, 1, &sd->minh);
301 301
302 eo_do(obj, elm_scrollable_interface_content_viewport_size_get(&vw, &vh));
303 if (sd->items)
304 {
305 Elm_Diskselector_Item *it = sd->items->data;
306 evas_object_size_hint_min_get(VIEW(it), &mw, &mh);
307 }
308 if (sd->minh < mh) sd->minh = mh;
302 edje_object_size_min_restricted_calc 309 edje_object_size_min_restricted_calc
303 (wd->resize_obj, &sd->minw, &sd->minh, sd->minw, 310 (wd->resize_obj, &sd->minw, &sd->minh, sd->minw,
304 sd->minh); 311 sd->minh);
@@ -458,14 +465,16 @@ _item_text_set_hook(Elm_Object_Item *item,
458 const char *label) 465 const char *label)
459{ 466{
460 Elm_Diskselector_Item *it; 467 Elm_Diskselector_Item *it;
468 Evas_Coord mw, mh;
461 469
462 if (part && strcmp(part, "default")) return; 470 if (part && strcmp(part, "default")) return;
463 471
464 it = (Elm_Diskselector_Item *)item; 472 it = (Elm_Diskselector_Item *)item;
465 eina_stringshare_replace(&it->label, label); 473 eina_stringshare_replace(&it->label, label);
466 edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label); 474 edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label);
467
468 _item_signal_emit(it); 475 _item_signal_emit(it);
476 edje_object_size_min_calc(VIEW(it), &mw, &mh);
477 evas_object_size_hint_min_set(VIEW(it), 0, mh);
469} 478}
470 479
471static const char * 480static const char *