rds1983 / Myra

UI Library for MonoGame, FNA and Stride
MIT License
704 stars 94 forks source link

Fixed grid spacing #378

Closed IceReaper closed 1 year ago

IceReaper commented 1 year ago

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.

rds1983 commented 1 year ago

thanks @IceReaper!