The bounds include the actual x,y positioning, which is also impacted by the border, along with the available space inside the borders.
The variable rect Then adds up the position of the actual cell.
If a cell runs out of the available space, the cell must be made smaller.
However when using the Width / Height values only, we end up ignoring the space reserved by the border top and left.
Example:
We have 100 pixels space x and y, but we have a border of 10, the rect is 10,10,100,100
The available space is 100,100
It does however check using the rect.Right - which adds the border (x,y) to the available size. => 110,110
110,110 does not fit inside a 100,100 box, hence it makes the item smaller, resulting in the empty space.
By using the Right and Bottom properties, we check wether it fits properly with the real rect lower right edge => 110,110.
Fixed #376
The bounds include the actual x,y positioning, which is also impacted by the border, along with the available space inside the borders. The variable
rect
Then adds up the position of the actual cell. If a cell runs out of the available space, the cell must be made smaller. However when using the Width / Height values only, we end up ignoring the space reserved by the border top and left.Example:
By using the Right and Bottom properties, we check wether it fits properly with the real rect lower right edge => 110,110.