Repository navigation
Add independent window UI scaling - #14
Open
katulevskiy wants to merge 3 commits into
Open
katulevskiy wants to merge 3 commits into
katulevskiy wants to merge 3 commits into
Conversation
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GPUI currently offers font-size changes, but cannot scale an entire application interface independently of the monitor density. Add
Window::set_ui_scaleso 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_boundslets 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=1passed 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 passescargo 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.