Skip to content

Add independent window UI scaling - #14

Open
katulevskiy wants to merge 3 commits into
zeronsh:mainfrom
katulevskiy:feat/window-ui-scale
Open

katulevskiy wants to merge 3 commits into
zeronsh:mainfrom
katulevskiy:feat/window-ui-scale

Conversation

@katulevskiy

@katulevskiy katulevskiy commented Oct 1, 2026 •

Copy link
Copy Markdown

GPUI currently offers font-size changes, but cannot scale an entire application interface independently of the monitor density. Add Window::set_ui_scale so layout, painting, pointer hit testing, and pixel scrolling share a consistent coordinate system while native window dimensions and rem/font preferences remain unchanged.

The window preserves zoom across native bounds/display updates. Native pointer, touch, file-drop, IME, window-menu, and client-inset coordinates are converted at the platform boundary; synthetic UI events keep their existing logical coordinates. ui_to_platform_bounds lets applications position native child views correctly.

This supports persistent desktop UI scaling in zeronsh/zeron#705. The application change uses a temporary Cargo patch to this branch until the API is merged upstream.

Validation: cargo test -p gpui --lib ui_scale -- --test-threads=1 passed both regression tests, covering combined display/UI scaling, unchanged native geometry/fonts, invalid factors, resize retention, and pointer/pixel-versus-line scroll conversion. The consuming Zeron UI suite passed all 1,433 tests, and its desktop application passes cargo check. Verified native Linux screenshots at 100%, 150%, and light mode 120% are included in the application PR; macOS and Windows still need live verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant