Improve grid lines visibility on higher resolutions
Closes https://github.com/ppy/osu/issues/30072
Currently grid line thickness remain the same across all resolutions by adjusting it's draw size so that it's screen-space size is always 1px. In this pr I've added a lower limit so with higher resolutions (2k-ish and higher) thickness will be 2px.
Comparison at around 4k:
| master | pr |
|---|---|
This breaks the line display at non-high dpi resolutions:
| Before | After |
|---|---|
The whole point is to avoid blurry lines, so that needs to be respected.
Seems like my lower bound isn't low enough. In that case we can increase thickness only for 4k. I'm not sure if I have any other ideas otherwise..
That would be my proposal. It may help to keep the true pixel count an integer value to ensure no blurring even when at higher DPI.
I'm pretty damn sure we want to base this on DPI, not screen width:
https://github.com/user-attachments/assets/546e6112-c44c-4410-99db-9eb486f9d253
And I'm not against that, but I'm not sure if there's a sane way to get DPI info in this context. Probably should've stated that earlier.
IWindow.Scale should be the way to get DPI, but I don't think it works as expected across the different platforms. SDL3 provides proper ways to get DPI of a SDL_Display.