elementary label: restore label size calc logic from Tizen 4.0
authorYoungbok Shin <youngb.shin@samsung.com>
Fri, 11 May 2018 05:27:36 +0000 (14:27 +0900)
committerYoungbok Shin <youngb.shin@samsung.com>
Fri, 8 Jun 2018 10:49:28 +0000 (19:49 +0900)
@tizen_fix

Change-Id: Ic636e617a87a23b8572467d32df063b4a58c041b
Signed-off-by: Youngbok Shin <youngb.shin@samsung.com>
src/lib/elementary/elm_label.c

index 45a6988..42eb947 100644 (file)
@@ -51,10 +51,23 @@ _recalc(void *data)
 
    /* If wrap_w is not set, label's width has to be controlled
       by outside of label. So, we don't need to set minimum width. */
+   /* TIZEN_ONLY(20180511): restore label size calc logic from Tizen 4.0
    if (sd->wrap_w == -1)
      evas_object_size_hint_min_set(data, 0, minh);
    else
      evas_object_size_hint_min_set(data, minw, minh);
+    */
+   if ((minw <= resw) && (minw != sd->wrap_w))
+     {
+        Evas_Coord ominw = -1;
+
+        evas_object_size_hint_min_get(data, &ominw, NULL);
+        minw = ominw;
+     }
+
+   evas_object_size_hint_min_set(data, minw, minh);
+   /* END */
+
    /* TIZEN_ONLY(20161109): wrap width will work as min and max width */
    if (sd->wrap_w > 0)
      evas_object_size_hint_max_set(data, minw, -1);