Repository navigation
fix(sidebar): keep the tab color strip clear of the tab icon #632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
63aa3e3
fix(sidebar): keep the tab color strip clear of the tab icon
GuangminJu 0102365
fix(sidebar): keep rem-based row padding and anchor the strip to the …
GuangminJu 1ac3945
Merge branch 'main' into fix/sidebar-tab-strip-gap
GuangminJu 1eb0558
Merge branch 'main' into fix/sidebar-tab-strip-gap
GuangminJu a41d2e5
Integrate reviewed keymap and welcome fixes before sidebar validation
Kuddev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Preserve the existing rem-based row padding. In pinned GPUI a71e175,
px_2()is generated asrems(0.5), not an unconditional 8 logical pixels (gpui_macros/src/styles.rs:948-951). Pinned gpui-component e95f47d sets each window's rem size fromcx.theme().font_sizein Root::render, and this application's theme.rs:775 uses the configured UI font size with a 14px default. Consequently this replacement moves the icon/title start from 7px to 8px at the default size, and from 12px to 8px at a 24px UI size, while the TABS/header padding still scales. This contradicts the stated unchanged-column scope and breaks alignment for custom font sizes. Keep the existing padding unit and derive the strip geometry from the actual resolved padding, including small-font bounds; check at least the default and an enlarged UI font size. This finding is from the actual style/Root/theme code, not an additional visual run.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, confirmed:
px_2()isrems(0.5)andRootsets the rem size fromtheme.font_size, so the fixed 8px was wrong.Fixed in 0102365.
px_2()is restored and unchanged. The strip now sits at the row's left edge (.left_0()) instead of the legacy 4px inset, so its gap to the content is0.5rem − 2.5pxand scales with the UI font: 2.5 / 4.5 / 9.5px at 10 / 14 / 24px. I checked 14px and 24px in a real window; screenshots are in the updated description.I also tried keeping a fixed 4.5px gap derived from
window.rem_size(). At 24px the strip then floats inside the padding and reads like a glyph in front of the title, so I dropped that approach.