Ver código fonte

Fix clipping with UseLayoutRounding.

Steven Kirk 10 anos atrás
pai
commit
01a5b5a345
1 arquivos alterados com 6 adições e 0 exclusões
  1. 6 0
      src/Perspex.Layout/Layoutable.cs

+ 6 - 0
src/Perspex.Layout/Layoutable.cs

@@ -505,6 +505,12 @@ namespace Perspex.Layout
                 height = Math.Max(height, child.DesiredSize.Height);
                 height = Math.Max(height, child.DesiredSize.Height);
             }
             }
 
 
+            if (UseLayoutRounding)
+            {
+                width = Math.Ceiling(width);
+                height = Math.Ceiling(height);
+            }
+
             return new Size(width, height);
             return new Size(width, height);
         }
         }