chore: Fix Slider, Progress width in horizontal mode. (#1096)

This bug included since Taffy 0.8 update in
[#taffy](https://github.com/zed-industries/zed/pull/34939)
This commit is contained in:
Jason Lee 2025-07-28 18:56:09 +08:00 committed by GitHub
parent 93b578294c
commit 461ed9c173
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -36,6 +36,7 @@ impl RenderOnce for Progress {
});
div()
.w_full()
.relative()
.h(px(self.height))
.rounded(radius)

View file

@ -266,10 +266,12 @@ impl RenderOnce for Slider {
div()
.id(("slider", self.state.entity_id()))
.flex()
.flex_1()
.when(axis.is_vertical(), |this| {
this.flex().items_center().justify_center()
this.items_center().justify_center()
})
.when(axis.is_horizontal(), |this| this.w_full())
.child(
h_flex()
.when(!self.disabled, |this| {