summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/Label.cs32
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/Span.cs26
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs2
3 files changed, 5 insertions, 55 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/Label.cs b/Xamarin.Forms.Platform.Tizen/Native/Label.cs
index a75e6aa..44eb5cb 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/Label.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/Label.cs
@@ -243,19 +243,9 @@ namespace Xamarin.Forms.Platform.Tizen.Native
/// <value>The vertical text alignment.</value>
public TextAlignment VerticalTextAlignment
{
- get
- {
- return _span.VerticalTextAlignment;
- }
-
- set
- {
- if (value != _span.VerticalTextAlignment)
- {
- _span.VerticalTextAlignment = value;
- ApplyTextAndStyle();
- }
- }
+ // TODO. need to EFL new API
+ get;
+ set;
}
/// <summary>
@@ -312,32 +302,18 @@ namespace Xamarin.Forms.Platform.Tizen.Native
Resize(availableWidth, size.Height);
- var rawSize = Native.TextHelper.GetRawTextBlockSize(this);
var formattedSize = Native.TextHelper.GetFormattedTextBlockSize(this);
Resize(size.Width, size.Height);
// Set bottom padding for lower case letters that have segments below the bottom line of text (g, j, p, q, y).
var verticalPadding = (int)Math.Ceiling(0.05 * FontSize);
- 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()
- {
- Width = formattedSize.Width,
- Height = Math.Min(formattedSize.Height, Math.Max(rawSize.Height, availableHeight)),
- };
- }
- else
- {
- return formattedSize;
- }
+ return formattedSize;
}
void ApplyTextAndStyle()
diff --git a/Xamarin.Forms.Platform.Tizen/Native/Span.cs b/Xamarin.Forms.Platform.Tizen/Native/Span.cs
index 99fe008..2f26649 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/Span.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/Span.cs
@@ -95,12 +95,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native
public TextAlignment HorizontalTextAlignment { get; set; }
/// <summary>
- /// Gets or sets the vertical alignment mode for the text.
- /// See <see cref="TextAlignment"/> for information about TextAlignment.
- /// </summary>
- public TextAlignment VerticalTextAlignment { get; set; }
-
- /// <summary>
/// Gets or sets the value that indicates whether the text has underline.
/// </summary>
public bool Underline { get; set; }
@@ -123,7 +117,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native
ForegroundColor = EColor.Default;
BackgroundColor = EColor.Default;
HorizontalTextAlignment = TextAlignment.None;
- VerticalTextAlignment = TextAlignment.None;
LineBreakMode = LineBreakMode.None;
Underline = false;
Strikethrough = false;
@@ -238,25 +231,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native
break;
}
- switch (VerticalTextAlignment)
- {
- case TextAlignment.Auto:
- case TextAlignment.Start:
- _formattingString.Append("valign=top ");
- break;
-
- case TextAlignment.End:
- _formattingString.Append("valign=bottom ");
- break;
-
- case TextAlignment.Center:
- _formattingString.Append("valign=middle ");
- break;
-
- case TextAlignment.None:
- break;
- }
-
switch (LineBreakMode)
{
case LineBreakMode.NoWrap:
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs
index 49611e4..be5de86 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs
@@ -44,7 +44,7 @@ namespace Xamarin.Forms.Platform.Tizen
protected override Size MinimumSize()
{
- return new Size(Control.MinimumWidth, Control.MinimumHeight);
+ return Control.Measure(Control.MinimumWidth, Control.MinimumHeight).ToDP();
}
Native.FormattedString ConvertFormattedText(FormattedString formattedString)