mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-06 19:08:06 +03:00
ui: Don't show tooltip when ButtonLike is selected (#13857)
This fixes the issue of a tooltip covering the thing that the button has revealed. It also mirrors what other UI frameworks do. Chrome on Linux behaves the same, and Safari does the same thing on macOS. It fixes this: ![Screenshot from 2024-07-05 12-39-22](https://github.com/zed-industries/zed/assets/1185253/51ce4347-d12f-463a-9adb-da031fe2f751) Release Notes: - N/A
This commit is contained in:
parent
1260b52c82
commit
f2711b2fca
@ -507,9 +507,11 @@ impl RenderOnce for ButtonLike {
|
||||
})
|
||||
},
|
||||
)
|
||||
.when_some(self.tooltip, |this, tooltip| {
|
||||
.when(!self.selected, |this| {
|
||||
this.when_some(self.tooltip, |this, tooltip| {
|
||||
this.tooltip(move |cx| tooltip(cx))
|
||||
})
|
||||
})
|
||||
.children(self.children)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user