project_panel: Don't add extra margin-left to file name labels (#32602)

In this PR I want to improve the UI of the project panel's files tree.
Currently, the project panel renders an extra gap between file icons and
the file name, making it visually unpleasant. The changes in the PR
remove the gap, bringing the labels closer to their icon:

_Before/After_

<img width="647" alt="zed-before-after"
src="https://github.com/user-attachments/assets/d815c075-f1f8-4a77-a3b3-d1275988a5dc"
/>

Also, this extra gap between the icon and the label seems inconsistent
with how other similar components, which are based on the `ListItem`,
are used.

Release Notes:

- Fixed an extra gap between the file icon and the file name label in
the project panel.
This commit is contained in:
Vladimir Varankin 2025-06-12 15:38:15 +02:00 committed by GitHub
parent c7ee489c07
commit 47af72bfe1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4413,8 +4413,7 @@ impl ProjectPanel {
)
}
})
}
.ml_1(),
},
)
.on_secondary_mouse_down(cx.listener(
move |this, event: &MouseDownEvent, window, cx| {