osu icon indicating copy to clipboard operation
osu copied to clipboard

Improve grid lines visibility on higher resolutions

Open EVAST9919 opened this issue 1 year ago • 6 comments

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
master pr

EVAST9919 avatar Oct 04 '24 23:10 EVAST9919

This breaks the line display at non-high dpi resolutions:

Before After
Safari 2024-10-07 at 08 37 42 osu! 2024-10-07 at 08 34 56

The whole point is to avoid blurry lines, so that needs to be respected.

peppy avatar Oct 07 '24 08:10 peppy

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..

EVAST9919 avatar Oct 07 '24 15:10 EVAST9919

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.

peppy avatar Oct 09 '24 03:10 peppy

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

peppy avatar Oct 10 '24 17:10 peppy

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.

EVAST9919 avatar Oct 10 '24 18:10 EVAST9919

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.

Susko3 avatar Oct 13 '24 14:10 Susko3