Fix Label wrap issue
authorSeungkeun Lee <sngn.lee@samsung.com>
Tue, 10 Jan 2017 03:59:13 +0000 (12:59 +0900)
committerKangho Hur <kangho.hur@samsung.com>
Fri, 24 Mar 2017 04:18:59 +0000 (13:18 +0900)
 - In some case wrap was not properly working
 - The label width should be 1 pixel larger than formattedtext block size
 - It is EFL rule

Change-Id: Ie246dd73b678921c3a0c503022c58b3a2c8dc887

Xamarin.Forms.Platform.Tizen/Native/Label.cs

index c07cce8..9d52cde 100644 (file)
@@ -1,4 +1,4 @@
-using System;
+using System;
 using ElmSharp;
 using ELabel = ElmSharp.Label;
 using EColor = ElmSharp.Color;
@@ -300,6 +300,11 @@ namespace Xamarin.Forms.Platform.Tizen.Native
                        rawSize.Height += verticalPadding;
                        formattedSize.Height += verticalPadding;
 
+                       // This is the EFL team's guide.
+                       // For wrap to work properly, the label must be 1 pixel larger than the size of the formatted text.
+                       rawSize.Width += 1;
+                       formattedSize.Width += 1;
+
                        if (rawSize.Width > availableWidth)
                        {
                                return new ESize()