-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
settings_ui: Fix scrollbar breaking when UI font size changes #45099
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
Conversation
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
When the UI font size changes, the settings window's scrollbar would break because list item measurements were cached and not invalidated. We're using `ListState.measure_all()` to pre-measure all items for an accurate scrollbar. When font size changes, these cached measurements become stale but weren't being refreshed. This commit fixes the issue by calling `ListState.measure_all()` when settings change, ensuring items are re-measured on the next layout without affecting scroll position. Closes #43683
Anthony-Eid
reviewed
Dec 17, 2025
Introduce a new method `ListState::remeasure` to allow clients to invalidate cached measurements without changing the scroll position. This is useful when item heights may have changed (e.g., font size changes) but the number and identity of items remains the same.
fc8809d to
9fb12ee
Compare
Preserve proportional scroll position when remeasuring list items. When item heights change (e.g., due to font size changes), the scroll position is now maintained relative to the item rather than jumping.
Contributor
|
@dinocosta I think this is good to merge btw! Is there any blockers on your end that I could help fix? |
Anthony-Eid
approved these changes
Jan 6, 2026
Member
Author
Thank you for the review! On my end, the only remaining question were these changes – #45099 (comment) – but since that looks good to you, I'll go ahead and merge this 🚢 |
rtfeldman
pushed a commit
that referenced
this pull request
Jan 6, 2026
When the UI font size changes, the settings window's scrollbar would break because list item measurements were cached and not invalidated. We're using `ListState.measure_all()` to pre-measure all items for an accurate scrollbar. When font size changes, these cached measurements become stale but weren't being refreshed. This commit fixes the issue by calling `ListState.measure_all()` when settings change, ensuring items are re-measured on the next layout without affecting scroll position. Closes #43683 Release Notes: - Fixed bug where changing the UI Font Size in the Settings UI would break the scrollbar for the "Appearance" page --------- Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
…dustries#45099) When the UI font size changes, the settings window's scrollbar would break because list item measurements were cached and not invalidated. We're using `ListState.measure_all()` to pre-measure all items for an accurate scrollbar. When font size changes, these cached measurements become stale but weren't being refreshed. This commit fixes the issue by calling `ListState.measure_all()` when settings change, ensuring items are re-measured on the next layout without affecting scroll position. Closes zed-industries#43683 Release Notes: - Fixed bug where changing the UI Font Size in the Settings UI would break the scrollbar for the "Appearance" page --------- Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
…dustries#45099) When the UI font size changes, the settings window's scrollbar would break because list item measurements were cached and not invalidated. We're using `ListState.measure_all()` to pre-measure all items for an accurate scrollbar. When font size changes, these cached measurements become stale but weren't being refreshed. This commit fixes the issue by calling `ListState.measure_all()` when settings change, ensuring items are re-measured on the next layout without affecting scroll position. Closes zed-industries#43683 Release Notes: - Fixed bug where changing the UI Font Size in the Settings UI would break the scrollbar for the "Appearance" page --------- Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
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.
When the UI font size changes, the settings window's scrollbar would break because list item measurements were cached and not invalidated.
We're using
ListState.measure_all()to pre-measure all items for an accurate scrollbar. When font size changes, these cached measurements become stale but weren't being refreshed.This commit fixes the issue by calling
ListState.measure_all()when settings change, ensuring items are re-measured on the next layout without affecting scroll position.Closes #43683
Release Notes: