Skip to content

Commit

Permalink
fix: BorderThicknessProperty warning on skia/wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 committed Apr 13, 2022
1 parent d403a71 commit 96a46d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Uno.UI/UI/Xaml/UIElement.skia.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ partial void OnRenderTransformSet()
internal void ArrangeVisual(Rect finalRect, Rect? clippedFrame = default)
{
LayoutSlotWithMarginsAndAlignments =
VisualTreeHelper.GetParent(this) is UIElement parent
VisualTreeHelper.GetParent(this) is UIElement parent && parent is not RootVisual
? finalRect.DeflateBy(parent.GetBorderThickness())
: finalRect;

Expand Down
3 changes: 2 additions & 1 deletion src/Uno.UI/UI/Xaml/UIElement.wasm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Uno.UI;
using Uno.UI.Extensions;
using Uno.UI.Xaml;
using Uno.UI.Xaml.Core;
using Windows.UI.Xaml.Controls;
using Windows.System;

Expand Down Expand Up @@ -207,7 +208,7 @@ protected internal void SetClasses(string[] cssClasses, int index = -1)
protected internal void ArrangeVisual(Rect rect, Rect? clipRect)
{
LayoutSlotWithMarginsAndAlignments =
VisualTreeHelper.GetParent(this) is UIElement parent
VisualTreeHelper.GetParent(this) is UIElement parent && parent is not RootVisual
? rect.DeflateBy(parent.GetBorderThickness())
: rect;

Expand Down

0 comments on commit 96a46d4

Please sign in to comment.