progress: Fix incorrect border radius (#1555)

| Before | After |
| - | - |
| <img width="848" height="274" alt="SCR-20251111-nduc"
src="https://github.com/user-attachments/assets/e04590a3-6154-41f6-9763-a7de7db2301e"
/> | <img width="821" height="272" alt="SCR-20251111-ndpb"
src="https://github.com/user-attachments/assets/04ba2e28-0c7f-4205-b8b5-cc79b661ecef"
/> |
This commit is contained in:
Floyd Wang 2025-11-11 14:53:50 +08:00 committed by GitHub
parent 1a5dd46acd
commit 13f25bc4a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,6 +60,7 @@ impl RenderOnce for Progress {
div()
.w_full()
.relative()
.rounded_full()
.refine_style(&self.style)
.bg(color.opacity(0.2))
.child(
@ -72,7 +73,7 @@ impl RenderOnce for Progress {
.bg(color)
.map(|this| match self.value {
v if v >= 100. => this.refine_style(&inner_style),
_ => this.refine_style(&inner_style).rounded_l_none(),
_ => this.refine_style(&inner_style).rounded_r_none(),
}),
)
}