Skip to content

Commit e6cc9f5

Browse files
RemcoSmitsDevSomeoneToIgnore
authored andcommitted
gpui: Fix uniform list horizon offset for non-horizontal scrollable lists (#18748)
Closes #18739 I'm not sure why the `+ padding.left` was added, but this was the cause of the issue. I also tested removing the extra left padding but didn't seem to see a difference inside the project panel. So we can maybe even remove it? **Before:** ![Screenshot 2024-10-04 at 21 43 34](https://github.com/user-attachments/assets/b5d67cd9-f92b-4301-880c-d351fe156c98) **After:** <img width="294" alt="Screenshot 2024-10-04 at 21 49 05" src="https://github.com/user-attachments/assets/8cc84170-a86b-46b8-91c9-39def64f0bd0"> Release Notes: - Fix code action list not horizontal aligned correctly
1 parent 8ee9520 commit e6cc9f5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/gpui/src/elements/uniform_list.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,11 @@ impl Element for UniformList {
297297
for (mut item, ix) in items.into_iter().zip(visible_range) {
298298
let item_origin = padded_bounds.origin
299299
+ point(
300-
scroll_offset.x + padding.left,
300+
if can_scroll_horizontally {
301+
scroll_offset.x + padding.left
302+
} else {
303+
scroll_offset.x
304+
},
301305
item_height * ix + scroll_offset.y + padding.top,
302306
);
303307
let available_width = if can_scroll_horizontally {

0 commit comments

Comments
 (0)