Skip to content

Commit

Permalink
[NUI] View extensions using UIColor do bind for every input
Browse files Browse the repository at this point in the history
Signed-off-by: Jiyun Yang <[email protected]>
  • Loading branch information
rabbitfor committed Feb 25, 2025
1 parent 22c03f2 commit 6e29f5a
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions src/Tizen.NUI.Extension/Markup/ViewExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ public static T Color<T>(this T view, UIColor color) where T : View
{
//FIXME: we need to set UI value type directly without converting reference value.
view.Color = color.ToReferenceType();

if (color.IsToken)
{
TokenManager.ColorTable.Bind(view, ViewPropertySetters.Color, color);
}
TokenManager.ColorTable.Bind(view, ViewPropertySetters.Color, color);
return view;
}

Expand Down Expand Up @@ -138,11 +134,7 @@ public static T BackgroundColor<T>(this T view, uint value, float alpha) where T
public static T BackgroundColor<T>(this T view, UIColor color) where T : View
{
view.SetBackgroundColor(color);

if (color.IsToken)
{
TokenManager.ColorTable.Bind(view, ViewPropertySetters.BackgroundColor, color);
}
TokenManager.ColorTable.Bind(view, ViewPropertySetters.BackgroundColor, color);
return view;
}

Expand Down Expand Up @@ -327,12 +319,7 @@ public static T BoxShadow<T>(this T view, float blurRadius, UIColor color, float
public static T BoxShadow<T>(this T view, UIShadow shadow) where T : View
{
view.SetBoxShadow(shadow);

if (shadow.Color.IsToken)
{
TokenManager.ColorTable.Bind(view, ViewPropertySetters.BoxShadowColor, shadow.Color);
}

TokenManager.ColorTable.Bind(view, ViewPropertySetters.BoxShadowColor, shadow.Color);
return view;
}

Expand Down Expand Up @@ -424,11 +411,7 @@ public static T BorderlineColor<T>(this T view, UIColor color) where T : View
{
//FIXME: we need to set UI value type directly without converting reference value.
view.BorderlineColor = color.ToReferenceType();

if (color.IsToken)
{
TokenManager.ColorTable.Bind(view, ViewPropertySetters.BorderlineColor, color);
}
TokenManager.ColorTable.Bind(view, ViewPropertySetters.BorderlineColor, color);
return view;
}

Expand Down

0 comments on commit 6e29f5a

Please sign in to comment.