assistant panel: Animate assistant label if message is pending (#16152)
This adds a pulsating effect to the assistant header in case the message is pending. The pulsating effect is capped between 0.2 and 1.0 and I tried (with the help of Claude) to give it a "breathing" effect, since I found the normal bounce a bit too much. Also opted for setting the `alpha` on the `LabelLike` things, vs. overwriting the color, since I think that's cleaner instead of exposing the color and mutating that. https://github.com/user-attachments/assets/4a94a1c5-8dc7-4c40-b30f-d92d112db7b5 Release Notes: - N/A
This commit is contained in:
parent
b36d1386a9
commit
af36d4934c
6 changed files with 98 additions and 10 deletions
|
@ -53,6 +53,11 @@ impl LabelCommon for HighlightedLabel {
|
|||
self.base = self.base.italic(italic);
|
||||
self
|
||||
}
|
||||
|
||||
fn alpha(mut self, alpha: f32) -> Self {
|
||||
self.base = self.base.alpha(alpha);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
pub fn highlight_ranges(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue