summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJee-Yong Um <jc9.um@samsung.com>2015-10-26 01:27:02 +0100
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2015-11-12 10:15:03 +0100
commitbbf6edd866ccf55edfb441eea510647b4eae04b3 (patch)
treed4903702368e87a4c2f2213f513777203876712e /src
parent3a44e70abc50c902cd95976208a7e77b3cd3b0c7 (diff)
hoversel: expands scrollable hoversel as large as it can
Summary: In D2063, "max_size" data item is added to limit the number of items to show at a time when hoversel is expanded. However, it limits the number of items too few, so makes scrollable function useless. This patch removes limitation of hoversel size with pixels, but if it needs, developers can set the limitation yet. (By theme customization) Test Plan: elementary_test "hoversel" click the second hoversel Reviewers: DaveMDS, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3223 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/bin/test_hoversel.c7
-rw-r--r--src/lib/elc_hoversel.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/src/bin/test_hoversel.c b/src/bin/test_hoversel.c
index 2979e02a6..72f7bad86 100644
--- a/src/bin/test_hoversel.c
+++ b/src/bin/test_hoversel.c
@@ -193,6 +193,13 @@ test_hoversel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
193 NULL); 193 NULL);
194 elm_hoversel_item_add(hoversel, "Item 5 - Long Label Here", NULL, ELM_ICON_NONE, NULL, 194 elm_hoversel_item_add(hoversel, "Item 5 - Long Label Here", NULL, ELM_ICON_NONE, NULL,
195 NULL); 195 NULL);
196 elm_hoversel_item_add(hoversel, "Item 6", NULL, ELM_ICON_NONE, NULL, NULL);
197 elm_hoversel_item_add(hoversel, "Item 7", NULL, ELM_ICON_NONE, NULL, NULL);
198 elm_hoversel_item_add(hoversel, "Item 8", NULL, ELM_ICON_NONE, NULL, NULL);
199 elm_hoversel_item_add(hoversel, "Item 9", NULL, ELM_ICON_NONE, NULL, NULL);
200 elm_hoversel_item_add(hoversel, "Item 10", NULL, ELM_ICON_NONE, NULL, NULL);
201 elm_hoversel_item_add(hoversel, "Item 11", NULL, ELM_ICON_NONE, NULL, NULL);
202 elm_hoversel_item_add(hoversel, "Item 12", NULL, ELM_ICON_NONE, NULL, NULL);
196 elm_box_pack_end(bx, hoversel); 203 elm_box_pack_end(bx, hoversel);
197 evas_object_show(hoversel); 204 evas_object_show(hoversel);
198 205
diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c
index 4f827dca5..a922fbea5 100644
--- a/src/lib/elc_hoversel.c
+++ b/src/lib/elc_hoversel.c
@@ -254,11 +254,10 @@ _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd)
254 254
255 if (sd->horizontal) 255 if (sd->horizontal)
256 { 256 {
257 ww = MIN(box_w, max_size); 257 ww = (max_size > 0) ? MIN(box_w, max_size) : box_w ;
258 hh = box_h; 258 hh = box_h;
259 259
260 evas_object_size_hint_min_set(sd->spacer, ww, hh); 260 evas_object_size_hint_min_set(sd->spacer, ww, hh);
261 evas_object_size_hint_max_set(sd->spacer, max_size, -1);
262 261
263 if (!sd->last_location) 262 if (!sd->last_location)
264 sd->last_location = elm_hover_best_content_location_get(sd->hover, ELM_HOVER_AXIS_HORIZONTAL); 263 sd->last_location = elm_hover_best_content_location_get(sd->hover, ELM_HOVER_AXIS_HORIZONTAL);
@@ -266,10 +265,9 @@ _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd)
266 else 265 else
267 { 266 {
268 ww = box_w; 267 ww = box_w;
269 hh = MIN(box_h, max_size); 268 hh = (max_size > 0) ? MIN(box_h, max_size) : box_h ;
270 269
271 evas_object_size_hint_min_set(sd->spacer, ww, hh); 270 evas_object_size_hint_min_set(sd->spacer, ww, hh);
272 evas_object_size_hint_max_set(sd->spacer, -1, max_size);
273 271
274 if (!sd->last_location) 272 if (!sd->last_location)
275 sd->last_location = elm_hover_best_content_location_get(sd->hover, ELM_HOVER_AXIS_VERTICAL); 273 sd->last_location = elm_hover_best_content_location_get(sd->hover, ELM_HOVER_AXIS_VERTICAL);