core icon indicating copy to clipboard operation
core copied to clipboard

Fullscreen causes things to be too small on macOS Retina display

Open kkoreilly opened this issue 1 year ago • 0 comments

Describe the bug

On a macOS Retina display, when you enter fullscreen (true fullscreen via Scene.SetFullscreen), everything becomes twice as small since we cannot find a video mode with the correct resolution and DevicePixelRatio, so the screen effectively turns into a normal DPR=1 4K monitor but with a small physical size, resulting in everything looking small, including the elements and the cursor. The black bar that should exist next to the camera is also missing, so the camera sometimes obscures some content.

The ideal solution to this is to find a fullscreen video mode with the same resolution and DPR as the retina screen itself (ie: width = 2K, DPR = 2).

How to reproduce

Run a Cogent Core app on a macOS Retina screen, right click, click Window, then click Fullscreen.

Example code

No response

Relevant output

No response

Platform

macOS

kkoreilly avatar Dec 15 '24 22:12 kkoreilly