ZIm/crates/gpui/src
Finn Evers 4280bff10a
Reapply "ui: Account for padding of parent container during scrollbar layout" (#30577)
This PR reapplies #27402 which was reverted in
https://github.com/zed-industries/zed/pull/30544 due to the issue
@ConradIrwin reported in
https://github.com/zed-industries/zed/pull/27402#issuecomment-2871745132.
The reported issue is already present on main but not visible, see
https://github.com/zed-industries/zed/pull/27402#issuecomment-2872546903
for more context and reproduction steps.

The fix here was to move the padding for the hover popover up to the
parent container. This does not fix the underlying problem but serves as
workaround without any disadvantages until a better solution is found. I
would currently guess that the underlying issue might be related to some
rem-size calculations for small font sizes or something similar (e.g.
https://github.com/zed-industries/zed/pull/22732 could possibly be
somewhat related).

Notably, the fix here does not cause any difference in layouting (the
following screenshots are actually distinct images), yet fixes the
problem at hand.

### Default font size (`15px`) 

| `main` | This PR |
| --- | --- |
|
![main_large](https://github.com/user-attachments/assets/66d38827-9023-4f78-9ceb-54fb13c21e41)
|![PR](https://github.com/user-attachments/assets/7af82bd2-2732-4cba-8d4b-54605d6ff101)
|

### Smaller font size (`12px`)

| `main` | This PR |
| --- | --- |
|
![pr_large](https://github.com/user-attachments/assets/d43be6e6-6840-422c-baf0-368aab733dac)
|
![PR](https://github.com/user-attachments/assets/43f60b2b-2578-45d2-bcab-44edf2612ce2)
|

Furthermore, for the second scenario, the popover would be scrollable on
main. As there is no scrollbar in the second image for this PR, this no
longer happens with this branch.


Release Notes:

- N/A
2025-05-14 13:26:14 +02:00
..
app agent: Render diffs for the edit file tool (#29234) 2025-04-23 15:43:33 -03:00
elements Reapply "ui: Account for padding of parent container during scrollbar layout" (#30577) 2025-05-14 13:26:14 +02:00
keymap vim: Add g? convert to Rot13/Rot47 (#27824) 2025-04-02 02:17:00 +00:00
platform windows: Remove unneeded ranges for replace_and_mark_text_in_range (#30668) 2025-05-14 07:26:10 +00:00
text_system Use Vec instead of SmallVec for glyphs field of ShapedRun (#30664) 2025-05-14 07:02:38 +00:00
window chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
action.rs Fix documentation of impl_action_with_deprecated_aliases (#29063) 2025-04-18 17:35:48 +00:00
app.rs Use ESC to cancel dragging in Zed (#30318) 2025-05-08 22:58:38 +00:00
arena.rs chore: Prepare for Rust edition bump to 2024 (without autofix) (#27791) 2025-03-31 20:10:36 +02:00
asset_cache.rs gpui: Relax AssetLogger trait bounds (#29450) 2025-04-29 12:43:54 -07:00
assets.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
bounds_tree.rs chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
color.rs chore: remove redundant word in comment (#30338) 2025-05-09 07:33:20 +00:00
element.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
executor.rs Add a test for remote tool use by the agent (#30289) 2025-05-08 16:53:04 -04:00
geometry.rs gpui: Update argument name of the from_corners method (#29968) 2025-05-06 07:17:39 +03:00
global.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
gpui.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
input.rs Implement character index for point (#23989) 2025-02-04 20:15:43 +00:00
interactive.rs gpui: Optimize coalesce float sign checking (#28072) 2025-04-10 14:39:50 -06:00
key_dispatch.rs Fix context_stack race in KeyContextView (#29324) 2025-04-23 23:34:39 -06:00
keymap.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
path_builder.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
platform.rs Use Vec instead of SmallVec for glyphs field of ShapedRun (#30664) 2025-05-14 07:02:38 +00:00
prelude.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
scene.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
shared_string.rs chore: Prepare for Rust edition bump to 2024 (without autofix) (#27791) 2025-03-31 20:10:36 +02:00
shared_uri.rs Rework loading images from files (#7088) 2024-01-30 11:26:02 -05:00
style.rs Fix apply buffer font features to completion tooltip (#30362) (#30519) 2025-05-11 19:45:41 +00:00
styled.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
subscription.rs chore: Prepare for Rust edition bump to 2024 (without autofix) (#27791) 2025-03-31 20:10:36 +02:00
svg_renderer.rs gpui: Add support for text in SVGs (#26335) 2025-03-14 08:25:11 -05:00
taffy.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
test.rs Add seed argument to #[gpui::test] attribute macro (#26764) 2025-03-14 13:40:02 -03:00
text_system.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
util.rs gpui: Fix typo in doc comment (#29950) 2025-05-05 17:05:48 -04:00
view.rs Add more view tracking (#24683) 2025-02-11 19:18:54 +00:00
window.rs Implement rendering of images with data urls in markdown (#30322) 2025-05-08 18:26:24 -07:00