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:
parent
93b578294c
commit
461ed9c173
2 changed files with 4 additions and 1 deletions
|
|
@ -36,6 +36,7 @@ impl RenderOnce for Progress {
|
||||||
});
|
});
|
||||||
|
|
||||||
div()
|
div()
|
||||||
|
.w_full()
|
||||||
.relative()
|
.relative()
|
||||||
.h(px(self.height))
|
.h(px(self.height))
|
||||||
.rounded(radius)
|
.rounded(radius)
|
||||||
|
|
|
||||||
|
|
@ -266,10 +266,12 @@ impl RenderOnce for Slider {
|
||||||
|
|
||||||
div()
|
div()
|
||||||
.id(("slider", self.state.entity_id()))
|
.id(("slider", self.state.entity_id()))
|
||||||
|
.flex()
|
||||||
.flex_1()
|
.flex_1()
|
||||||
.when(axis.is_vertical(), |this| {
|
.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(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.when(!self.disabled, |this| {
|
.when(!self.disabled, |this| {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue