From 3ad684d1a9d45dfd7ed6c892aefbf21e230f3ffe Mon Sep 17 00:00:00 2001 From: darkleem Date: Wed, 17 May 2017 18:52:20 +0900 Subject: fix default textcolor Change-Id: I629b2d84f721cc1671b2b027c88b91f164bb4dc5 Signed-off-by: darkleem --- Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs | 3 +-- Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs | 4 +--- Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs | 11 ++--------- Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs | 3 +-- Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs | 4 +--- 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs index aed7b9d6..f7aef30f 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs @@ -7,7 +7,6 @@ namespace Xamarin.Forms.Platform.Tizen { //TODO need to add internationalization support const string DialogTitle = "Choose Date"; - static readonly EColor s_defaultTextColor = EColor.White; public DatePickerRenderer() { @@ -70,7 +69,7 @@ namespace Xamarin.Forms.Platform.Tizen void UpdateTextColor() { - Control.TextColor = Element.TextColor.IsDefault ? s_defaultTextColor : Element.TextColor.ToNative(); + Control.TextColor = Element.TextColor.ToNative(); } } diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs index 0f214636..ff96a677 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs @@ -5,8 +5,6 @@ namespace Xamarin.Forms.Platform.Tizen { public class EditorRenderer : ViewRenderer { - static readonly EColor s_defaultTextColor = EColor.Black; - public EditorRenderer() { RegisterPropertyHandler(Editor.TextProperty, UpdateText); @@ -61,7 +59,7 @@ namespace Xamarin.Forms.Platform.Tizen void UpdateTextColor() { - Control.TextColor = Element.TextColor.IsDefault ? s_defaultTextColor : Element.TextColor.ToNative(); + Control.TextColor = Element.TextColor.ToNative(); } void UpdateFontSize() diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs index 7e7c8925..c880098a 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs @@ -1,17 +1,10 @@ using System; -using Xamarin.Forms.PlatformConfiguration.TizenSpecific; - -using EColor = ElmSharp.Color; using Specific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.Entry; namespace Xamarin.Forms.Platform.Tizen { public class EntryRenderer : ViewRenderer, IDisposable { - static readonly EColor s_defaultTextColor = EColor.Black; - - static readonly EColor s_defaultPlaceholderColor = EColor.Gray; - public EntryRenderer() { RegisterPropertyHandler(Entry.IsPasswordProperty, UpdateIsPassword); @@ -90,7 +83,7 @@ namespace Xamarin.Forms.Platform.Tizen void UpdateTextColor() { - Control.TextColor = Element.TextColor.IsDefault ? s_defaultTextColor : Element.TextColor.ToNative(); + Control.TextColor = Element.TextColor.ToNative(); } void UpdateFontSize() @@ -125,7 +118,7 @@ namespace Xamarin.Forms.Platform.Tizen void UpdatePlaceholderColor() { - Control.PlaceholderColor = Element.PlaceholderColor.IsDefault ? s_defaultPlaceholderColor : Element.PlaceholderColor.ToNative(); + Control.PlaceholderColor = Element.PlaceholderColor.ToNative(); } void UpdateFontWeight() diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs index 6080d647..663e56b1 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs @@ -8,7 +8,6 @@ namespace Xamarin.Forms.Platform.Tizen { public class PickerRenderer : ViewRenderer { - static readonly EColor s_defaultTextColor = EColor.White; internal List _list; internal Native.Dialog _dialog; Dictionary _itemToItemNumber = new Dictionary(); @@ -62,7 +61,7 @@ namespace Xamarin.Forms.Platform.Tizen void UpdateTextColor() { - Control.TextColor = Element.TextColor.IsDefault ? s_defaultTextColor : Element.TextColor.ToNative(); + Control.TextColor = Element.TextColor.ToNative(); } void OnClick(object sender, EventArgs e) diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs index 9f964c18..68e697ed 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs @@ -11,8 +11,6 @@ namespace Xamarin.Forms.Platform.Tizen static readonly string s_defaultFormat = CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern; - static readonly EColor s_defaultTextColor = EColor.White; - string _format; TimeSpan _time; @@ -83,7 +81,7 @@ namespace Xamarin.Forms.Platform.Tizen void UpdateTextColor() { - Control.TextColor = Element.TextColor.IsDefault ? s_defaultTextColor : Element.TextColor.ToNative(); + Control.TextColor = Element.TextColor.ToNative(); } void UpdateTime() -- cgit v1.2.3