mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-24 13:39:08 +00:00
Special thanks to @lingyaochu for finding out the root cause of the issue. Took the test from: https://github.com/zed-industries/zed/pull/54233 The git graph was using `buffer_ui_size` when calculating the canvas row height and the table row height. This is wrong because elements such as `Labels` in the graph table were rendered using `ui_font_size`. This PR normalizes the row height calculation by always using `ui_font_size` for the canvas and table row height calculation, and taking into account the scaling factor. This PR also fixes a bug where the bottom of the canvas could flicker on its first redraw because the uniform list hadn't cached the viewport size yet, and we underestimated the visible size of the canvas and underdrew it. We now fallback to the window height as the viewport size. This means we'll overdraw for a single frame whenever the uniform list hasn't cached the last item size, but it avoids the flicker! Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #53492 Closes #53469 Release Notes: - git_graph: Fix misalignment issues between the graph canvas and the graph table --------- Co-authored-by: lingyaochu <zx0@mail.ustc.edu.cn> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||