From 01a5b5a34500055903a8149558d086771b9831a5 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 17 Oct 2015 19:10:41 +0200 Subject: [PATCH] Fix clipping with UseLayoutRounding. --- src/Perspex.Layout/Layoutable.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Perspex.Layout/Layoutable.cs b/src/Perspex.Layout/Layoutable.cs index 09c4e1c103..ead1ef88bc 100644 --- a/src/Perspex.Layout/Layoutable.cs +++ b/src/Perspex.Layout/Layoutable.cs @@ -505,6 +505,12 @@ namespace Perspex.Layout height = Math.Max(height, child.DesiredSize.Height); } + if (UseLayoutRounding) + { + width = Math.Ceiling(width); + height = Math.Ceiling(height); + } + return new Size(width, height); }