cogentcore / core

A free and open source framework for building powerful, fast, elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the web with a single Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.73k stars 82 forks source link

Change cursor size based on zoom / device pixel ratio #1119

Open barrylb opened 2 months ago

barrylb commented 2 months ago

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: IMG_8025

Changes to a small size when inside the window: IMG_8028

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

kkoreilly commented 2 months ago

Thanks for reporting this. We will work on implementing cursor sizing based on zoom / device pixel ratio soon.

matta commented 2 months ago

A similar effect can be seen on Debian Buster running a Gnome desktop on a Dell XPS laptop with a 4K screen.