summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-08-09 15:11:15 -0400
committerCedric BAIL <cedric.bail@free.fr>2019-08-14 12:08:06 -0700
commit144d086fd700a7993fe3b7167599bcd3a9d6969b (patch)
treeda71fc6028ac3396e696b8d99d4287e170b5769c
parent0c72d430c3989fc88375ba5664f2e89a8ec4d387 (diff)
efl_ui/popup: remove 'expandable' property from popup subclasses
this is more or less just the max size hint, so just set the max size hint ref T7902 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9550
-rw-r--r--src/bin/elementary/test_ui_popup.c32
-rw-r--r--src/lib/elementary/efl_ui_scroll_alert_popup.c45
-rw-r--r--src/lib/elementary/efl_ui_scroll_alert_popup.eo21
-rw-r--r--src/lib/elementary/efl_ui_scroll_alert_popup_private.h2
-rw-r--r--src/lib/elementary/efl_ui_text_alert_popup.c40
-rw-r--r--src/lib/elementary/efl_ui_text_alert_popup.eo15
-rw-r--r--src/lib/elementary/efl_ui_text_alert_popup_private.h1
-rw-r--r--src/tests/elementary/efl_ui_test_popup.c10
8 files changed, 32 insertions, 134 deletions
diff --git a/src/bin/elementary/test_ui_popup.c b/src/bin/elementary/test_ui_popup.c
index 8ac846cdff..16b0b9ccb1 100644
--- a/src/bin/elementary/test_ui_popup.c
+++ b/src/bin/elementary/test_ui_popup.c
@@ -428,7 +428,7 @@ _alert_scroll_case2_cb(void *data, const Efl_Event *ev EINA_UNUSED)
428 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 428 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
429 429
430 //This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined. 430 //This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined.
431 efl_ui_scroll_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(320, -1)); 431 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(320, -1));
432 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160)); 432 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160));
433 433
434 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL); 434 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL);
@@ -454,7 +454,7 @@ _alert_scroll_case3_cb(void *data, const Efl_Event *ev EINA_UNUSED)
454 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 454 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
455 455
456 //This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined. 456 //This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined.
457 efl_ui_scroll_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(-1, 320)); 457 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(-1, 320));
458 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160)); 458 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160));
459 459
460 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL); 460 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL);
@@ -480,7 +480,7 @@ _alert_scroll_case4_cb(void *data, const Efl_Event *ev EINA_UNUSED)
480 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 480 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
481 481
482 //This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined. 482 //This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined.
483 efl_ui_scroll_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(320, 320)); 483 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(320, 320));
484 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160)); 484 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160));
485 485
486 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL); 486 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL);
@@ -506,7 +506,7 @@ _alert_scroll_case5_cb(void *data, const Efl_Event *ev EINA_UNUSED)
506 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 506 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
507 507
508 //This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined. 508 //This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined.
509 efl_ui_scroll_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(80, 80)); 509 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(80, 80));
510 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160)); 510 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160));
511 511
512 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL); 512 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL);
@@ -619,7 +619,7 @@ _alert_text_case3_cb(void *data, const Efl_Event *ev EINA_UNUSED)
619 Eo *efl_ui_popup= efl_add(EFL_UI_TEXT_ALERT_POPUP_CLASS, win); 619 Eo *efl_ui_popup= efl_add(EFL_UI_TEXT_ALERT_POPUP_CLASS, win);
620 620
621 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200)); 621 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
622 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(300, 300)); 622 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(300, 300));
623 623
624 efl_text_set(efl_part(efl_ui_popup, "title"), "title"); 624 efl_text_set(efl_part(efl_ui_popup, "title"), "title");
625 efl_text_set(efl_ui_popup, "This is Text Popup"); 625 efl_text_set(efl_ui_popup, "This is Text Popup");
@@ -646,7 +646,7 @@ _alert_text_case4_cb(void *data, const Efl_Event *ev EINA_UNUSED)
646 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL); 646 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
647 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 647 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
648 648
649 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(300, -1)); 649 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(300, -1));
650 650
651 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL); 651 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
652} 652}
@@ -664,7 +664,7 @@ _alert_text_case5_cb(void *data, const Efl_Event *ev EINA_UNUSED)
664 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL); 664 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
665 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 665 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
666 666
667 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(-1, 300)); 667 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(-1, 300));
668 668
669 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200)); 669 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
670 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL); 670 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
@@ -686,7 +686,7 @@ _alert_text_case6_cb(void *data, const Efl_Event *ev EINA_UNUSED)
686 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL); 686 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
687 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 687 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
688 688
689 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(300, 300)); 689 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(300, 300));
690 690
691 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200)); 691 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
692 692
@@ -713,7 +713,7 @@ _alert_text_case7_cb(void *data, const Efl_Event *ev EINA_UNUSED)
713 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL); 713 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
714 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 714 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
715 715
716 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(300, -1)); 716 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(300, -1));
717 717
718 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL); 718 efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
719 719
@@ -736,7 +736,7 @@ _alert_text_case8_cb(void *data, const Efl_Event *ev EINA_UNUSED)
736 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL); 736 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
737 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 737 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
738 738
739 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(-1, 300)); 739 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(-1, 300));
740 740
741 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200)); 741 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
742 742
@@ -761,7 +761,7 @@ _alert_text_case9_cb(void *data, const Efl_Event *ev EINA_UNUSED)
761 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL); 761 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
762 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 762 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
763 763
764 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(10, 10)); 764 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(10, 10));
765 765
766 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200)); 766 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
767 767
@@ -786,7 +786,7 @@ _alert_text_case10_cb(void *data, const Efl_Event *ev EINA_UNUSED)
786 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL); 786 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
787 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 787 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
788 788
789 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(150, 150)); 789 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(150, 150));
790 790
791 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200)); 791 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
792 792
@@ -811,7 +811,7 @@ _alert_text_case11_cb(void *data, const Efl_Event *ev EINA_UNUSED)
811 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL); 811 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
812 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 812 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
813 813
814 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(150, -1)); 814 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(150, -1));
815 815
816 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200)); 816 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
817 817
@@ -836,7 +836,7 @@ _alert_text_case12_cb(void *data, const Efl_Event *ev EINA_UNUSED)
836 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL); 836 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
837 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 837 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
838 838
839 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(300, -1)); 839 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(300, -1));
840 840
841 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200)); 841 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
842 842
@@ -861,7 +861,7 @@ _alert_text_case13_cb(void *data, const Efl_Event *ev EINA_UNUSED)
861 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL); 861 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
862 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 862 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
863 863
864 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(-1, 150)); 864 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(-1, 150));
865 865
866 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200)); 866 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
867 867
@@ -886,7 +886,7 @@ _alert_text_case14_cb(void *data, const Efl_Event *ev EINA_UNUSED)
886 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL); 886 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
887 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL); 887 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
888 888
889 efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(-1, 300)); 889 efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(-1, 300));
890 890
891 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200)); 891 efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
892 892
diff --git a/src/lib/elementary/efl_ui_scroll_alert_popup.c b/src/lib/elementary/efl_ui_scroll_alert_popup.c
index 37311883fb..bba1392aed 100644
--- a/src/lib/elementary/efl_ui_scroll_alert_popup.c
+++ b/src/lib/elementary/efl_ui_scroll_alert_popup.c
@@ -20,13 +20,12 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Scroll_Alert_Popup_Data *pd,
20 Eina_Size2D obj_min, Eina_Size2D scr_min) 20 Eina_Size2D obj_min, Eina_Size2D scr_min)
21{ 21{
22 Eina_Size2D max_size, min_size; 22 Eina_Size2D max_size, min_size;
23 max_size.w = -1; 23 max_size = efl_gfx_hint_size_max_get(obj);
24 max_size.h = -1;
25 24
26 if (pd->max_size.w != -1) 25 if (max_size.w != -1)
27 max_size.w = (obj_min.w > pd->max_size.w) ? obj_min.w : pd->max_size.w; 26 max_size.w = (obj_min.w > max_size.w) ? obj_min.w : max_size.w;
28 if (pd->max_size.h != -1) 27 if (max_size.h != -1)
29 max_size.h = (obj_min.h > pd->max_size.h) ? obj_min.h : pd->max_size.h; 28 max_size.h = (obj_min.h > max_size.h) ? obj_min.h : max_size.h;
30 29
31 min_size = efl_gfx_hint_size_min_get(obj); 30 min_size = efl_gfx_hint_size_min_get(obj);
32 31
@@ -216,38 +215,6 @@ _efl_ui_scroll_alert_popup_text_get(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Alert_Pop
216 return efl_text_get(efl_part(efl_super(obj, MY_CLASS), part)); 215 return efl_text_get(efl_part(efl_super(obj, MY_CLASS), part));
217} 216}
218 217
219static void
220_efl_ui_scroll_alert_popup_expandable_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Alert_Popup_Data *pd, Eina_Size2D max_size)
221{
222 Eina_Bool valid_max_w = EINA_FALSE;
223 Eina_Bool valid_max_h = EINA_FALSE;
224
225 if ((max_size.w == -1) || (max_size.w >= 0))
226 valid_max_w = EINA_TRUE;
227
228 if ((max_size.h == -1) || (max_size.h >= 0))
229 valid_max_h = EINA_TRUE;
230
231 if (!valid_max_w || !valid_max_h)
232 {
233 ERR("Invalid max size(%d, %d)!"
234 "The max size should be equal to or bigger than 0. "
235 "To disable expandable property, set -1 to the max size.",
236 max_size.w, max_size.h);
237 return;
238 }
239
240 pd->max_size = max_size;
241
242 efl_canvas_group_change(obj);
243}
244
245static Eina_Size2D
246_efl_ui_scroll_alert_popup_expandable_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Alert_Popup_Data *pd)
247{
248 return pd->max_size;
249}
250
251EOLIAN static Eo * 218EOLIAN static Eo *
252_efl_ui_scroll_alert_popup_efl_object_constructor(Eo *obj, 219_efl_ui_scroll_alert_popup_efl_object_constructor(Eo *obj,
253 Efl_Ui_Scroll_Alert_Popup_Data *pd) 220 Efl_Ui_Scroll_Alert_Popup_Data *pd)
@@ -267,8 +234,6 @@ _efl_ui_scroll_alert_popup_efl_object_constructor(Eo *obj,
267 efl_content_set(efl_part(efl_super(obj, MY_CLASS), "efl.content"), 234 efl_content_set(efl_part(efl_super(obj, MY_CLASS), "efl.content"),
268 pd->scroller); 235 pd->scroller);
269 236
270 pd->max_size = EINA_SIZE2D(-1, -1);
271
272 return obj; 237 return obj;
273} 238}
274 239
diff --git a/src/lib/elementary/efl_ui_scroll_alert_popup.eo b/src/lib/elementary/efl_ui_scroll_alert_popup.eo
index 8f75b5a44e..709ff55004 100644
--- a/src/lib/elementary/efl_ui_scroll_alert_popup.eo
+++ b/src/lib/elementary/efl_ui_scroll_alert_popup.eo
@@ -3,27 +3,6 @@ import eina_types;
3class @beta Efl.Ui.Scroll_Alert_Popup extends Efl.Ui.Alert_Popup 3class @beta Efl.Ui.Scroll_Alert_Popup extends Efl.Ui.Alert_Popup
4{ 4{
5 [[EFL UI Scroll Alert Popup class]] 5 [[EFL UI Scroll Alert Popup class]]
6 methods {
7 @property expandable @beta {
8 set {
9 [[Set the expandable max size of popup.
10
11 If the given max_size is -1, then a popup appears with its size.
12 However, if the given max_size is bigger than 0 the popup size is up to the given max_size. If popup content's min size is bigger than the given max_size the scroller appears in the popup content area.
13 ]]
14 }
15 get {
16 [[Get the expandable max size of popup.
17
18 If the given max_size is -1, then popup appears with its size.
19 However, if the given max_size is bigger than 0 the popup size is up to the given max_size. If popup content's min size is bigger than the given max_size the scroller appears in the popup content area.
20 ]]
21 }
22 values {
23 max_size: Eina.Size2D; [[A 2D max size in pixel units.]]
24 }
25 }
26 }
27 implements { 6 implements {
28 Efl.Object.constructor; 7 Efl.Object.constructor;
29 Efl.Canvas.Group.group_calculate; 8 Efl.Canvas.Group.group_calculate;
diff --git a/src/lib/elementary/efl_ui_scroll_alert_popup_private.h b/src/lib/elementary/efl_ui_scroll_alert_popup_private.h
index 98ff244b15..2fe522a86b 100644
--- a/src/lib/elementary/efl_ui_scroll_alert_popup_private.h
+++ b/src/lib/elementary/efl_ui_scroll_alert_popup_private.h
@@ -8,8 +8,6 @@ struct _Efl_Ui_Scroll_Alert_Popup_Data
8{ 8{
9 Eo *scroller; 9 Eo *scroller;
10 Eo *content; 10 Eo *content;
11 Eina_Size2D size;
12 Eina_Size2D max_size;
13}; 11};
14 12
15#endif 13#endif
diff --git a/src/lib/elementary/efl_ui_text_alert_popup.c b/src/lib/elementary/efl_ui_text_alert_popup.c
index 6fc625d3d2..64dfcc856f 100644
--- a/src/lib/elementary/efl_ui_text_alert_popup.c
+++ b/src/lib/elementary/efl_ui_text_alert_popup.c
@@ -21,13 +21,13 @@ static void
21_scroller_sizing_eval(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd, Eina_Size2D obj_min, Eina_Size2D text_min) 21_scroller_sizing_eval(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd, Eina_Size2D obj_min, Eina_Size2D text_min)
22{ 22{
23 Eina_Size2D max_size, min_size; 23 Eina_Size2D max_size, min_size;
24 max_size.w = -1;
25 max_size.h = -1;
26 24
27 if (pd->max_size.w != -1) 25 max_size = efl_gfx_hint_size_max_get(obj);
28 max_size.w = (obj_min.w > pd->max_size.w) ? obj_min.w : pd->max_size.w; 26
29 if (pd->max_size.h != -1) 27 if (max_size.w != -1)
30 max_size.h = (obj_min.h > pd->max_size.h) ? obj_min.h : pd->max_size.h; 28 max_size.w = (obj_min.w > max_size.w) ? obj_min.w : max_size.w;
29 if (max_size.h != -1)
30 max_size.h = (obj_min.h > max_size.h) ? obj_min.h : max_size.h;
31 31
32 min_size = efl_gfx_hint_size_min_get(obj); 32 min_size = efl_gfx_hint_size_min_get(obj);
33 33
@@ -231,32 +231,6 @@ _efl_ui_text_alert_popup_efl_text_text_get(const Eo *obj, Efl_Ui_Text_Alert_Popu
231 return _efl_ui_text_alert_popup_text_get(obj, pd, "efl.text"); 231 return _efl_ui_text_alert_popup_text_get(obj, pd, "efl.text");
232} 232}
233 233
234static void
235_efl_ui_text_alert_popup_expandable_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Alert_Popup_Data *pd, Eina_Size2D max_size)
236{
237 Eina_Bool valid_max_w = EINA_FALSE;
238 Eina_Bool valid_max_h = EINA_FALSE;
239
240 if ((max_size.w == -1) || (max_size.w >= 0))
241 valid_max_w = EINA_TRUE;
242
243 if ((max_size.h == -1) || (max_size.h >= 0))
244 valid_max_h = EINA_TRUE;
245
246 if (!valid_max_w || !valid_max_h)
247 {
248 ERR("Invalid max size(%d, %d)!"
249 "The max size should be equal to or bigger than 0. "
250 "To disable expandable property, set -1 to the max size.",
251 max_size.w, max_size.h);
252 return;
253 }
254
255 pd->max_size = max_size;
256
257 efl_canvas_group_change(obj);
258}
259
260EOLIAN static Eo * 234EOLIAN static Eo *
261_efl_ui_text_alert_popup_efl_object_constructor(Eo *obj, 235_efl_ui_text_alert_popup_efl_object_constructor(Eo *obj,
262 Efl_Ui_Text_Alert_Popup_Data *pd) 236 Efl_Ui_Text_Alert_Popup_Data *pd)
@@ -276,8 +250,6 @@ _efl_ui_text_alert_popup_efl_object_constructor(Eo *obj,
276 efl_content_set(efl_part(efl_super(obj, MY_CLASS), "efl.content"), 250 efl_content_set(efl_part(efl_super(obj, MY_CLASS), "efl.content"),
277 pd->scroller); 251 pd->scroller);
278 252
279 pd->max_size = EINA_SIZE2D(-1, -1);
280
281 return obj; 253 return obj;
282} 254}
283 255
diff --git a/src/lib/elementary/efl_ui_text_alert_popup.eo b/src/lib/elementary/efl_ui_text_alert_popup.eo
index b8e48da770..8ec9f71f88 100644
--- a/src/lib/elementary/efl_ui_text_alert_popup.eo
+++ b/src/lib/elementary/efl_ui_text_alert_popup.eo
@@ -3,21 +3,6 @@ import eina_types;
3class @beta Efl.Ui.Text_Alert_Popup extends Efl.Ui.Alert_Popup implements Efl.Text 3class @beta Efl.Ui.Text_Alert_Popup extends Efl.Ui.Alert_Popup implements Efl.Text
4{ 4{
5 [[EFL UI Text Alert Popup class]] 5 [[EFL UI Text Alert Popup class]]
6 methods {
7 @property expandable {
8 set {
9 [[Set the expandable of popup.
10
11 If the contents of the popup has min size, the popup will be increased by min size along the Y axis.
12 If max hint is set it will be increased to the value of max hint
13 and scrolling will occur.
14 ]]
15 }
16 values {
17 max_size: Eina.Size2D; [[A 2D max size in pixel units.]]
18 }
19 }
20 }
21 implements { 6 implements {
22 Efl.Object.constructor; 7 Efl.Object.constructor;
23 Efl.Canvas.Group.group_calculate; 8 Efl.Canvas.Group.group_calculate;
diff --git a/src/lib/elementary/efl_ui_text_alert_popup_private.h b/src/lib/elementary/efl_ui_text_alert_popup_private.h
index f07d460f1a..30f567b987 100644
--- a/src/lib/elementary/efl_ui_text_alert_popup_private.h
+++ b/src/lib/elementary/efl_ui_text_alert_popup_private.h
@@ -8,7 +8,6 @@ struct _Efl_Ui_Text_Alert_Popup_Data
8{ 8{
9 Eo *scroller; 9 Eo *scroller;
10 Eo *message; 10 Eo *message;
11 Eina_Size2D max_size;
12}; 11};
13 12
14#endif 13#endif
diff --git a/src/tests/elementary/efl_ui_test_popup.c b/src/tests/elementary/efl_ui_test_popup.c
index 0c161dc366..df9208d47b 100644
--- a/src/tests/elementary/efl_ui_test_popup.c
+++ b/src/tests/elementary/efl_ui_test_popup.c
@@ -332,7 +332,7 @@ EFL_START_TEST(efl_ui_test_popup_scroll_alert_expand)
332 popup_sz_min = popup_sz_min1 = efl_gfx_hint_size_combined_min_get(popup); 332 popup_sz_min = popup_sz_min1 = efl_gfx_hint_size_combined_min_get(popup);
333 333
334 /* first test horizontal expand */ 334 /* first test horizontal expand */
335 efl_ui_scroll_alert_popup_expandable_set(popup, EINA_SIZE2D(POPUP_SIZE_EXPAND, -1)); 335 efl_gfx_hint_size_max_set(popup, EINA_SIZE2D(POPUP_SIZE_EXPAND, -1));
336 efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE)); 336 efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
337 efl_canvas_group_calculate(popup); 337 efl_canvas_group_calculate(popup);
338 338
@@ -358,7 +358,7 @@ EFL_START_TEST(efl_ui_test_popup_scroll_alert_expand)
358 } 358 }
359 359
360 /* now expand vertically */ 360 /* now expand vertically */
361 efl_ui_scroll_alert_popup_expandable_set(popup, EINA_SIZE2D(-1, POPUP_SIZE_EXPAND)); 361 efl_gfx_hint_size_max_set(popup, EINA_SIZE2D(-1, POPUP_SIZE_EXPAND));
362 efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE)); 362 efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
363 efl_canvas_group_calculate(popup); 363 efl_canvas_group_calculate(popup);
364 364
@@ -385,7 +385,7 @@ EFL_START_TEST(efl_ui_test_popup_scroll_alert_expand)
385 } 385 }
386 386
387 /* now both */ 387 /* now both */
388 efl_ui_scroll_alert_popup_expandable_set(popup, EINA_SIZE2D(POPUP_SIZE_EXPAND, POPUP_SIZE_EXPAND)); 388 efl_gfx_hint_size_max_set(popup, EINA_SIZE2D(POPUP_SIZE_EXPAND, POPUP_SIZE_EXPAND));
389 efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE)); 389 efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
390 efl_canvas_group_calculate(popup); 390 efl_canvas_group_calculate(popup);
391 391
@@ -417,7 +417,7 @@ EFL_START_TEST(efl_ui_test_popup_scroll_alert_expand)
417 } 417 }
418 418
419 /* now use a confining expand which ignores content min size */ 419 /* now use a confining expand which ignores content min size */
420 efl_ui_scroll_alert_popup_expandable_set(popup, EINA_SIZE2D(POPUP_SIZE / 2, POPUP_SIZE / 2)); 420 efl_gfx_hint_size_max_set(popup, EINA_SIZE2D(POPUP_SIZE / 2, POPUP_SIZE / 2));
421 efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE)); 421 efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
422 efl_canvas_group_calculate(popup); 422 efl_canvas_group_calculate(popup);
423 423
@@ -511,7 +511,7 @@ EFL_START_TEST(efl_ui_test_popup_text_alert)
511 eina_strbuf_append(buf, test_string); 511 eina_strbuf_append(buf, test_string);
512 512
513 efl_text_set(popup, eina_strbuf_string_get(buf)); 513 efl_text_set(popup, eina_strbuf_string_get(buf));
514 efl_ui_text_alert_popup_expandable_set(popup, test_expands[i]); 514 efl_gfx_hint_size_max_set(popup, test_expands[i]);
515 efl_canvas_group_calculate(popup); 515 efl_canvas_group_calculate(popup);
516 516
517 /* get internal label object: VERY illegal */ 517 /* get internal label object: VERY illegal */