summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-07-30 13:12:07 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-07-30 13:12:52 -0400
commitd17ec12faf92d39ce26242c8a6adde4b5ead817c (patch)
treee0a5beebd944475bd082718d275fbfb9ab35d92b /src/lib
parent872d43f0a06c1d28bca5981ad02723ab81b1ae7c (diff)
efl_ui: always set restricted_min size hints internally
Summary: regular min size hint is for users, internal calcs should use restricted @fix Depends on D9441 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl_widgets Maniphest Tasks: T8059 Differential Revision: https://phab.enlightenment.org/D9442
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elementary/efl_ui_collection.c2
-rw-r--r--src/lib/elementary/efl_ui_internal_text_scroller.c3
-rw-r--r--src/lib/elementary/efl_ui_scroll_alert_popup.c2
-rw-r--r--src/lib/elementary/efl_ui_scroller.c2
-rw-r--r--src/lib/elementary/efl_ui_tags.c12
-rw-r--r--src/lib/elementary/efl_ui_text_alert_popup.c2
-rw-r--r--src/lib/elementary/efl_ui_textpath.c4
7 files changed, 13 insertions, 14 deletions
diff --git a/src/lib/elementary/efl_ui_collection.c b/src/lib/elementary/efl_ui_collection.c
index b12712b139..efc56fc5c6 100644
--- a/src/lib/elementary/efl_ui_collection.c
+++ b/src/lib/elementary/efl_ui_collection.c
@@ -182,7 +182,7 @@ flush_min_size(Eo *obj, Efl_Ui_Collection_Data *pd)
182 if (!pd->match_content.h) 182 if (!pd->match_content.h)
183 tmp.h = -1; 183 tmp.h = -1;
184 184
185 efl_gfx_hint_size_min_set(obj, tmp); 185 efl_gfx_hint_size_restricted_min_set(obj, tmp);
186} 186}
187 187
188static int 188static int
diff --git a/src/lib/elementary/efl_ui_internal_text_scroller.c b/src/lib/elementary/efl_ui_internal_text_scroller.c
index cf6f9fbf31..f774d2f6dc 100644
--- a/src/lib/elementary/efl_ui_internal_text_scroller.c
+++ b/src/lib/elementary/efl_ui_internal_text_scroller.c
@@ -117,9 +117,8 @@ _efl_ui_internal_text_scroller_efl_canvas_group_group_calculate(Eo *obj,
117 fsz.w = view.w; 117 fsz.w = view.w;
118 } 118 }
119 119
120 // FIXME: should be restricted_min?
121 efl_gfx_entity_size_set(sd->text_table, fsz); 120 efl_gfx_entity_size_set(sd->text_table, fsz);
122 efl_gfx_hint_size_min_set(obj, size); 121 efl_gfx_hint_size_restricted_min_set(obj, size);
123 efl_gfx_hint_size_max_set(obj, EINA_SIZE2D(-1, size.h)); 122 efl_gfx_hint_size_max_set(obj, EINA_SIZE2D(-1, size.h));
124 } 123 }
125} 124}
diff --git a/src/lib/elementary/efl_ui_scroll_alert_popup.c b/src/lib/elementary/efl_ui_scroll_alert_popup.c
index 476178d9ae..e8d50115f9 100644
--- a/src/lib/elementary/efl_ui_scroll_alert_popup.c
+++ b/src/lib/elementary/efl_ui_scroll_alert_popup.c
@@ -100,7 +100,7 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Scroll_Alert_Popup_Data *pd,
100 } 100 }
101 efl_canvas_group_calculate(pd->scroller); 101 efl_canvas_group_calculate(pd->scroller);
102 102
103 efl_gfx_hint_size_min_set(obj, new_min); 103 efl_gfx_hint_size_restricted_min_set(obj, new_min);
104} 104}
105 105
106static void 106static void
diff --git a/src/lib/elementary/efl_ui_scroller.c b/src/lib/elementary/efl_ui_scroller.c
index fdd6139c19..56adea8332 100644
--- a/src/lib/elementary/efl_ui_scroller.c
+++ b/src/lib/elementary/efl_ui_scroller.c
@@ -340,7 +340,7 @@ _efl_ui_scroller_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Scroller_Data
340 if ((max.w > 0) && (size.w > max.w)) size.w = max.w; 340 if ((max.w > 0) && (size.w > max.w)) size.w = max.w;
341 if ((max.h > 0) && (size.h > max.h)) size.h = max.h; 341 if ((max.h > 0) && (size.h > max.h)) size.h = max.h;
342 342
343 efl_gfx_hint_size_min_set(obj, size); 343 efl_gfx_hint_size_restricted_min_set(obj, size);
344} 344}
345 345
346EOLIAN static Eina_Error 346EOLIAN static Eina_Error
diff --git a/src/lib/elementary/efl_ui_tags.c b/src/lib/elementary/efl_ui_tags.c
index 07f6ac02bc..a2d3964fa1 100644
--- a/src/lib/elementary/efl_ui_tags.c
+++ b/src/lib/elementary/efl_ui_tags.c
@@ -119,7 +119,7 @@ _shrink_mode_set(Eo *obj,
119 119
120 edje_object_size_min_calc(sd->end, &w_label_count, &h); 120 edje_object_size_min_calc(sd->end, &w_label_count, &h);
121 elm_coords_finger_size_adjust(1, &w_label_count, 1, &h); 121 elm_coords_finger_size_adjust(1, &w_label_count, 1, &h);
122 efl_gfx_hint_size_min_set(sd->end, EINA_SIZE2D(w_label_count, h)); 122 efl_gfx_hint_size_restricted_min_set(sd->end, EINA_SIZE2D(w_label_count, h));
123 elm_box_pack_end(sd->box, sd->end); 123 elm_box_pack_end(sd->box, sd->end);
124 evas_object_show(sd->end); 124 evas_object_show(sd->end);
125 125
@@ -425,7 +425,7 @@ _item_new(Efl_Ui_Tags_Data *sd,
425 if (sd->w_box && min.w > r.w) 425 if (sd->w_box && min.w > r.w)
426 { 426 {
427 elm_coords_finger_size_adjust(1, &r.w, 1, &min.h); 427 elm_coords_finger_size_adjust(1, &r.w, 1, &min.h);
428 efl_gfx_hint_size_min_set(layout, EINA_SIZE2D(r.w, min.h)); 428 efl_gfx_hint_size_restricted_min_set(layout, EINA_SIZE2D(r.w, min.h));
429 efl_gfx_entity_size_set(layout, EINA_SIZE2D(r.w, min.h)); 429 efl_gfx_entity_size_set(layout, EINA_SIZE2D(r.w, min.h));
430 } 430 }
431 431
@@ -514,7 +514,7 @@ _box_resize_cb(void *data,
514 if (min.w > r.w - hpad) 514 if (min.w > r.w - hpad)
515 { 515 {
516 min.w = r.w - hpad; 516 min.w = r.w - hpad;
517 efl_gfx_hint_size_min_set(layout, EINA_SIZE2D(min.w, min.h)); 517 efl_gfx_hint_size_restricted_min_set(layout, EINA_SIZE2D(min.w, min.h));
518 efl_gfx_entity_size_set(layout, EINA_SIZE2D(min.w, min.h)); 518 efl_gfx_entity_size_set(layout, EINA_SIZE2D(min.w, min.h));
519 } 519 }
520 } 520 }
@@ -764,7 +764,7 @@ _box_min_size_calculate(Evas_Object *box,
764 } 764 }
765 box_min.h = lineh * line_num + (line_num - 1) * priv->pad.v; 765 box_min.h = lineh * line_num + (line_num - 1) * priv->pad.v;
766 766
767 efl_gfx_hint_size_min_set(box, EINA_SIZE2D(box_min.w, box_min.h)); 767 efl_gfx_hint_size_restricted_min_set(box, EINA_SIZE2D(box_min.w, box_min.h));
768 *line_height = lineh; 768 *line_height = lineh;
769 769
770 return EINA_TRUE; 770 return EINA_TRUE;
@@ -911,7 +911,7 @@ _view_init(Evas_Object *obj, Efl_Ui_Tags_Data *sd)
911 efl_text_interactive_editable_set(efl_added, EINA_TRUE), 911 efl_text_interactive_editable_set(efl_added, EINA_TRUE),
912 efl_composite_attach(obj, efl_added)); 912 efl_composite_attach(obj, efl_added));
913 913
914 efl_gfx_hint_size_min_set(sd->entry, EINA_SIZE2D(MIN_W_ENTRY, 0)); 914 efl_gfx_hint_size_restricted_min_set(sd->entry, EINA_SIZE2D(MIN_W_ENTRY, 0));
915 evas_object_size_hint_weight_set 915 evas_object_size_hint_weight_set
916 (sd->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 916 (sd->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
917 efl_gfx_hint_fill_set(sd->entry, EINA_TRUE, EINA_TRUE); 917 efl_gfx_hint_fill_set(sd->entry, EINA_TRUE, EINA_TRUE);
@@ -929,7 +929,7 @@ _view_init(Evas_Object *obj, Efl_Ui_Tags_Data *sd)
929 929
930 edje_object_size_min_calc(sd->end, &button_min_width, &button_min_height); 930 edje_object_size_min_calc(sd->end, &button_min_width, &button_min_height);
931 elm_coords_finger_size_adjust(1, &button_min_width, 1, &button_min_height); 931 elm_coords_finger_size_adjust(1, &button_min_width, 1, &button_min_height);
932 efl_gfx_hint_size_min_set(sd->end, EINA_SIZE2D(button_min_width, button_min_height)); 932 efl_gfx_hint_size_restricted_min_set(sd->end, EINA_SIZE2D(button_min_width, button_min_height));
933 elm_widget_sub_object_add(obj, sd->end); 933 elm_widget_sub_object_add(obj, sd->end);
934 } 934 }
935} 935}
diff --git a/src/lib/elementary/efl_ui_text_alert_popup.c b/src/lib/elementary/efl_ui_text_alert_popup.c
index 2f014e0a11..abb9a0338b 100644
--- a/src/lib/elementary/efl_ui_text_alert_popup.c
+++ b/src/lib/elementary/efl_ui_text_alert_popup.c
@@ -104,7 +104,7 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd, Eina_Size2D obj
104 } 104 }
105 efl_canvas_group_calculate(pd->scroller); 105 efl_canvas_group_calculate(pd->scroller);
106 106
107 efl_gfx_hint_size_min_set(obj, new_min); 107 efl_gfx_hint_size_restricted_min_set(obj, new_min);
108} 108}
109 109
110EOLIAN static void 110EOLIAN static void
diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c
index c06cbf62d1..bfd51ee008 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -883,7 +883,7 @@ _efl_ui_textpath_circular_set(Eo *obj, Efl_Ui_Textpath_Data *pd, double radius,
883 _path_start_angle_adjust(obj, pd); 883 _path_start_angle_adjust(obj, pd);
884 _sizing_eval(pd); 884 _sizing_eval(pd);
885 885
886 efl_gfx_hint_size_min_set(obj, EINA_SIZE2D((radius * 2) + text_size.h, (radius * 2) + text_size.h)); 886 efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D((radius * 2) + text_size.h, (radius * 2) + text_size.h));
887} 887}
888 888
889EOLIAN static int 889EOLIAN static int
@@ -1003,7 +1003,7 @@ elm_textpath_circle_set(Eo *obj, double x, double y, double radius, double start
1003 _path_start_angle_adjust(obj, pd); 1003 _path_start_angle_adjust(obj, pd);
1004 _sizing_eval(pd); 1004 _sizing_eval(pd);
1005 1005
1006 efl_gfx_hint_size_min_set(obj, EINA_SIZE2D(x * 2, y * 2)); 1006 efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(x * 2, y * 2));
1007} 1007}
1008 1008
1009#include "efl_ui_textpath_legacy_eo.c" 1009#include "efl_ui_textpath_legacy_eo.c"