fix(ui): improve desktop control sizing and spacing - #285
Open
WilliamWang1721 wants to merge 6 commits into
Open
WilliamWang1721 wants to merge 6 commits into
WilliamWang1721 wants to merge 6 commits into
Conversation
github-actions Bot
added a commit
to WilliamWang1721/pebrel
that referenced
this pull request
Sep 25, 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.
Result / 用户结果
Improve the desktop UI ergonomics and visual spacing of Pebrel, primarily addressing controls that appear undersized and overly compact on macOS while keeping the shared implementation appropriate for Windows.
Key changes:
The existing 34px font-size +/- controls and Settings navigation rows are already appropriately sized and are intentionally retained.
Terminal font size, terminal cell geometry, configuration semantics, native window controls, and terminal rendering density are unchanged.
Design / 设计边界
The root issue is not the font itself, but that several
gpui-componentcontrols derive their dimensions from the application'sremsize.Pebrel uses the UI font size as the
rembase. With the default 14px UI font, a nominal medium2rembutton becomes only about 28px high. Controls therefore become increasingly compressed as the UI font gets smaller.This change separates important desktop control geometry from the text-size baseline instead of globally enlarging the application.
The implementation remains deliberately small:
gpui-componentcontrols.Select triggers are enlarged without forcing their popup menus or search fields to inherit the same sizing.
The geometry is based on Pebrel's existing UI constraints and common desktop ergonomics rather than treating touch-oriented target sizes as desktop requirements.
Relevant references:
https://developer.apple.com/design/human-interface-guidelines/buttons
https://developer.apple.com/design/human-interface-guidelines/toolbars
https://learn.microsoft.com/en-us/windows/apps/design/style/spacing
The 32px interaction surface and 18px icon sizes are Pebrel design choices, not claimed as universal Apple or Windows requirements.
Evidence / 验证依据
The feature branch is based directly on upstream
main:9dc058d12765893553d5fc7a2c37c870c96168b0Local/preparation validation completed:
cargo fmt --all -- --checkgit diff --checkpython3 scripts/check_architecture.py --base 9dc058d12765893553d5fc7a2c37c870c96168b0A focused GPUI regression test was added for the shared controls. It verifies:
The implementation does not alter the terminal rendering hot path.
Remaining platform visual acceptance should still include:
Compilation or virtual-window tests should not be treated as substitutes for those native visual checks.
Required Review / 必须确认