Change cursor size based on zoom / device pixel ratio
Describe the bug
On Windows 11 running the demo the mouse cursor size is different to the usual size for the rest of the system while inside the Cogent app.
Large cursor when hovering over the title bar:
Changes to a small size when inside the window:
How to reproduce
go run cogentcore.org/core/examples/demo@main
This happens the "Scale" setting is set to 200% in Windows Display Settings. When I change the scale to 100% the mouse cursor is the same inside Cogent apps as everywhere else.
Example code
No response
Relevant output
No response
Platform
Windows
Thanks for reporting this. We will work on implementing cursor sizing based on zoom / device pixel ratio soon.
A similar effect can be seen on Debian Buster running a Gnome desktop on a Dell XPS laptop with a 4K screen.
This issue also happens in fullscreen on macOS retina displays as of #1341. This isn't just as simple as multiplying the cursor size by device pixel ratio, since on macOS it is actually correct originally with DPR = 2, but then it fails in fullscreen when DPR becomes 1. The cursor/mouse speed is also too slow in that fullscreen case, and no black bar is rendered where the camera is, even though it should be; there are some issues with the video mode support. Regardless, it should be possible to fix these issues, and this is a relatively high priority.
@barrylb @matta This issue should be fixed now as of #1372; the cursors now scale based on the DPI, while being appropriately invariant to DPR on macOS. You can update to the latest version on the main branch to get this functionality:
go get cogentcore.org/core@55e6ea8
Please let me know if this fixes your issues.
Also, the remaining fullscreen issues on macOS Retina displays are tracked by #1374 now.