From 87a0c671f6684e331d29d92700603420190d10db Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Mon, 24 Oct 2022 09:01:40 -0500 Subject: [PATCH] Adjusted only the bounds for content items to be floored. --- Source/Editor/Content/GUI/ContentView.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Editor/Content/GUI/ContentView.cs b/Source/Editor/Content/GUI/ContentView.cs index a7dc7b18f..9085042dc 100644 --- a/Source/Editor/Content/GUI/ContentView.cs +++ b/Source/Editor/Content/GUI/ContentView.cs @@ -720,14 +720,14 @@ namespace FlaxEditor.Content.GUI if (itemsToFit < 1) itemsToFit = 1; float itemsWidth = width / Mathf.Max(itemsToFit, 1); - itemsWidth = Mathf.Floor(itemsWidth); + var flooredItemsWidth = Mathf.Floor(itemsWidth); float itemsHeight = itemsWidth / defaultItemsWidth * (ContentItem.DefaultHeight * viewScale); - itemsHeight = Mathf.Floor(itemsHeight); + var flooredItemsHeight = Mathf.Floor(itemsHeight); x = itemsToFit == 1 ? 0 : itemsWidth / itemsToFit; for (int i = 0; i < _children.Count; i++) { var c = _children[i]; - c.Bounds = new Rectangle(x, y, itemsWidth, itemsHeight); + c.Bounds = new Rectangle(x, y, flooredItemsWidth, flooredItemsHeight); x += itemsWidth + itemsWidth / itemsToFit; if (x + itemsWidth > width)