From 3b81f7c9f8568342f266fbb53de257dacfddfabb Mon Sep 17 00:00:00 2001 From: huiyueun <35286162+huiyueun@users.noreply.github.com> Date: Wed, 29 Jan 2020 12:55:56 +0900 Subject: [PATCH] [NUI] Fix NUI svace issue (#1341) Signed-off-by: huiyu.eun --- src/Tizen.NUI.Components/Controls/Popup.cs | 9 ++++++--- src/Tizen.NUI/src/public/BaseComponents/Style/Selector.cs | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Tizen.NUI.Components/Controls/Popup.cs b/src/Tizen.NUI.Components/Controls/Popup.cs index da56faf..ae5fd3c 100755 --- a/src/Tizen.NUI.Components/Controls/Popup.cs +++ b/src/Tizen.NUI.Components/Controls/Popup.cs @@ -34,7 +34,7 @@ namespace Tizen.NUI.Components public static readonly BindableProperty ButtonHeightProperty = BindableProperty.Create(nameof(ButtonHeight), typeof(int), typeof(Popup), default(int), propertyChanged: (bindable, oldValue, newValue) => { var instance = (Popup)bindable; - if (newValue != null) + if (newValue != null && instance?.Style?.Buttons?.Size != null ) { instance.Style.Buttons.Size.Height = (int)newValue; instance.btGroup.Itemheight = (int)newValue; @@ -414,7 +414,10 @@ namespace Tizen.NUI.Components } set { - Style.Title.Size.Height = value; + if (Style?.Title?.Size != null) + { + Style.Title.Size.Height = value; + } } } @@ -780,7 +783,7 @@ namespace Tizen.NUI.Components titleY = (int)Style.Title.Position.Y; } - if (btGroup.Count != 0) + if (btGroup.Count != 0 && Style?.Buttons?.Size != null ) { buttonH = (int)Style.Buttons.Size.Height; } diff --git a/src/Tizen.NUI/src/public/BaseComponents/Style/Selector.cs b/src/Tizen.NUI/src/public/BaseComponents/Style/Selector.cs index bd2096b..590499c 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/Style/Selector.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/Style/Selector.cs @@ -379,7 +379,7 @@ namespace Tizen.NUI.BaseComponents return (T)((T)value).Clone(); } - if (type == typeof(Selector) && view != null) + if (type == typeof(Selector) && view != null && value != null) { Selector selector = (Selector)value; T valueInState = selector.GetValue(view.ControlState); -- 2.7.4