Main: Prevent playerBox from being offset on resize
When resizing the window (specifically the width), the playerBox
can get offset from the Blackboard. When the width is too small, there is a gap, and when the width is too wide, the playerButton
Rectangle becomes too large and extends beyond the Blackboard.
To fix this, we can use the same dynamic width calculation to set the rightMargin
anchor property. We are already doing this for the topMargin
, this property matches the dynamic height calculation.
While I was at it, I also made the size of the currentPlayerText
bigger. I opted for the larger `screen.width / 68.5` option as I thought this looked better personally, but open to suggestions. The default is not unbearable but it looks oddly out of place, in my opinion.
This MR also introduces a bit of simplified logic for the visible
property, and some minor formatting tweaks.
master
)
Before (
After (This MR)
Note that at ultra-wide resolutions, probably wider than could be reasonably expected, the text becomes so large that it can become taller than the width of the button. This affects all text that is sized relative to the screen width, however, and is not specific to this MR. The following screenshot illustrates this, with Kanagram stretched across my displays.
This would need to be addressed more broadly.
All feedback is welcome. Thanks!