zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d17ec12faf92d39ce26242c8a6adde4b5ead817c

commit d17ec12faf92d39ce26242c8a6adde4b5ead817c
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Tue Jul 30 13:12:07 2019 -0400

    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
---
 src/lib/elementary/efl_ui_collection.c             |  2 +-
 src/lib/elementary/efl_ui_internal_text_scroller.c |  3 +--
 src/lib/elementary/efl_ui_scroll_alert_popup.c     |  2 +-
 src/lib/elementary/efl_ui_scroller.c               |  2 +-
 src/lib/elementary/efl_ui_tags.c                   | 12 ++++++------
 src/lib/elementary/efl_ui_text_alert_popup.c       |  2 +-
 src/lib/elementary/efl_ui_textpath.c               |  4 ++--
 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)
    if (!pd->match_content.h)
      tmp.h = -1;
 
-   efl_gfx_hint_size_min_set(obj, tmp);
+   efl_gfx_hint_size_restricted_min_set(obj, tmp);
 }
 
 static 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,
                 fsz.w = view.w;
           }
 
-        // FIXME: should be restricted_min?
         efl_gfx_entity_size_set(sd->text_table, fsz);
-        efl_gfx_hint_size_min_set(obj, size);
+        efl_gfx_hint_size_restricted_min_set(obj, size);
         efl_gfx_hint_size_max_set(obj, EINA_SIZE2D(-1, size.h));
      }
 }
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,
      }
    efl_canvas_group_calculate(pd->scroller);
 
-   efl_gfx_hint_size_min_set(obj, new_min);
+   efl_gfx_hint_size_restricted_min_set(obj, new_min);
 }
 
 static 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
    if ((max.w > 0) && (size.w > max.w)) size.w = max.w;
    if ((max.h > 0) && (size.h > max.h)) size.h = max.h;
 
-   efl_gfx_hint_size_min_set(obj, size);
+   efl_gfx_hint_size_restricted_min_set(obj, size);
 }
 
 EOLIAN 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,
 
                   edje_object_size_min_calc(sd->end, &w_label_count, &h);
                   elm_coords_finger_size_adjust(1, &w_label_count, 1, &h);
-                  efl_gfx_hint_size_min_set(sd->end, 
EINA_SIZE2D(w_label_count, h));
+                  efl_gfx_hint_size_restricted_min_set(sd->end, 
EINA_SIZE2D(w_label_count, h));
                   elm_box_pack_end(sd->box, sd->end);
                   evas_object_show(sd->end);
 
@@ -425,7 +425,7 @@ _item_new(Efl_Ui_Tags_Data *sd,
    if (sd->w_box && min.w > r.w)
      {
         elm_coords_finger_size_adjust(1, &r.w, 1, &min.h);
-        efl_gfx_hint_size_min_set(layout, EINA_SIZE2D(r.w, min.h));
+        efl_gfx_hint_size_restricted_min_set(layout, EINA_SIZE2D(r.w, min.h));
         efl_gfx_entity_size_set(layout, EINA_SIZE2D(r.w, min.h));
      }
 
@@ -514,7 +514,7 @@ _box_resize_cb(void *data,
              if (min.w > r.w - hpad)
                {
                   min.w = r.w - hpad;
-                  efl_gfx_hint_size_min_set(layout, EINA_SIZE2D(min.w, min.h));
+                  efl_gfx_hint_size_restricted_min_set(layout, 
EINA_SIZE2D(min.w, min.h));
                   efl_gfx_entity_size_set(layout, EINA_SIZE2D(min.w, min.h));
                }
           }
@@ -764,7 +764,7 @@ _box_min_size_calculate(Evas_Object *box,
      }
    box_min.h = lineh * line_num + (line_num - 1) * priv->pad.v;
 
-   efl_gfx_hint_size_min_set(box, EINA_SIZE2D(box_min.w, box_min.h));
+   efl_gfx_hint_size_restricted_min_set(box, EINA_SIZE2D(box_min.w, 
box_min.h));
    *line_height = lineh;
 
    return EINA_TRUE;
@@ -911,7 +911,7 @@ _view_init(Evas_Object *obj, Efl_Ui_Tags_Data *sd)
                        efl_text_interactive_editable_set(efl_added, EINA_TRUE),
                        efl_composite_attach(obj, efl_added));
 
-   efl_gfx_hint_size_min_set(sd->entry, EINA_SIZE2D(MIN_W_ENTRY, 0));
+   efl_gfx_hint_size_restricted_min_set(sd->entry, EINA_SIZE2D(MIN_W_ENTRY, 
0));
    evas_object_size_hint_weight_set
      (sd->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    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)
 
         edje_object_size_min_calc(sd->end, &button_min_width, 
&button_min_height);
         elm_coords_finger_size_adjust(1, &button_min_width, 1, 
&button_min_height);
-        efl_gfx_hint_size_min_set(sd->end, EINA_SIZE2D(button_min_width, 
button_min_height));
+        efl_gfx_hint_size_restricted_min_set(sd->end, 
EINA_SIZE2D(button_min_width, button_min_height));
         elm_widget_sub_object_add(obj, sd->end);
      }
 }
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
     }
     efl_canvas_group_calculate(pd->scroller);
 
-    efl_gfx_hint_size_min_set(obj, new_min);
+    efl_gfx_hint_size_restricted_min_set(obj, new_min);
 }
 
 EOLIAN 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,
    _path_start_angle_adjust(obj, pd);
    _sizing_eval(pd);
 
-   efl_gfx_hint_size_min_set(obj, EINA_SIZE2D((radius * 2) + text_size.h, 
(radius * 2) + text_size.h));
+   efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D((radius * 2) + 
text_size.h, (radius * 2) + text_size.h));
 }
 
 EOLIAN static int
@@ -1003,7 +1003,7 @@ elm_textpath_circle_set(Eo *obj, double x, double y, 
double radius, double start
    _path_start_angle_adjust(obj, pd);
    _sizing_eval(pd);
 
-   efl_gfx_hint_size_min_set(obj, EINA_SIZE2D(x * 2, y * 2));
+   efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(x * 2, y * 2));
 }
 
 #include "efl_ui_textpath_legacy_eo.c"

-- 


Reply via email to