button: Fix loading style when disabled. (#1021)
## Before <img width="1193" alt="image" src="https://github.com/user-attachments/assets/e7a82f21-2ec8-42fa-8daa-05d4f086e0b2" /> ## After <img width="1196" alt="image" src="https://github.com/user-attachments/assets/f387c591-a4a1-4220-9318-badfb8a133e6" />
This commit is contained in:
parent
deb1187c40
commit
646b8b7206
1 changed files with 5 additions and 1 deletions
|
|
@ -520,7 +520,11 @@ impl RenderOnce for Button {
|
|||
})
|
||||
.children(self.children)
|
||||
})
|
||||
.when(self.loading, |this| this.bg(normal_style.bg.opacity(0.8)))
|
||||
.when(self.loading && !self.disabled, |this| {
|
||||
this.bg(normal_style.bg.opacity(0.8))
|
||||
.border_color(normal_style.border.opacity(0.8))
|
||||
.text_color(normal_style.fg.opacity(0.8))
|
||||
})
|
||||
.when_some(self.tooltip, |this, (tooltip, action)| {
|
||||
this.tooltip(move |window, cx| {
|
||||
Tooltip::new(tooltip.clone())
|
||||
|
|
|
|||
Loading…
Reference in a new issue