From 62b8c679ea1913c2eae2c3c2c8f534ff2ac76d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Thu, 30 May 2019 21:48:48 +0200 Subject: [PATCH] Update WrapPanel.cs --- src/Avalonia.Controls/WrapPanel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Controls/WrapPanel.cs b/src/Avalonia.Controls/WrapPanel.cs index 2382e689ad..fcc21a7b41 100644 --- a/src/Avalonia.Controls/WrapPanel.cs +++ b/src/Avalonia.Controls/WrapPanel.cs @@ -156,14 +156,14 @@ namespace Avalonia.Controls var sz = new UVSize(Orientation, child.DesiredSize.Width, child.DesiredSize.Height); - if ((curLineSize.U + sz.U) > uvFinalSize.U) //need to switch to another line + if (MathUtilities.GreaterThan(curLineSize.U + sz.U, uvFinalSize.U)) //need to switch to another line { arrangeLine(accumulatedV, curLineSize.V, firstInLine, i); accumulatedV += curLineSize.V; curLineSize = sz; - if (sz.U > uvFinalSize.U) //the element is wider then the constraint - give it a separate line + if (MathUtilities.GreaterThan(sz.U, uvFinalSize.U)) //the element is wider then the constraint - give it a separate line { //switch to next line which only contain one element arrangeLine(accumulatedV, sz.V, i, ++i);