assistant: Remove "Resolving" text for step resolution and use Transform instead (#16461)
That way, user can click on "Transform" straight away and get it applied immediately when it's resolved. https://github.com/user-attachments/assets/08c99804-3841-4eba-a5eb-7066a9f45b47 TODO: - [x] Tie "Send" button at the bottom into the same behavior Release Notes: - N/A
This commit is contained in:
parent
911112d94a
commit
56f1ab9459
2 changed files with 108 additions and 53 deletions
|
@ -89,6 +89,7 @@ pub struct Button {
|
|||
selected_icon: Option<IconName>,
|
||||
selected_icon_color: Option<Color>,
|
||||
key_binding: Option<KeyBinding>,
|
||||
alpha: Option<f32>,
|
||||
}
|
||||
|
||||
impl Button {
|
||||
|
@ -113,6 +114,7 @@ impl Button {
|
|||
selected_icon: None,
|
||||
selected_icon_color: None,
|
||||
key_binding: None,
|
||||
alpha: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -181,6 +183,12 @@ impl Button {
|
|||
self.key_binding = key_binding.into();
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the alpha property of the color of label.
|
||||
pub fn alpha(mut self, alpha: f32) -> Self {
|
||||
self.alpha = Some(alpha);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Selectable for Button {
|
||||
|
@ -409,6 +417,7 @@ impl RenderOnce for Button {
|
|||
Label::new(label)
|
||||
.color(label_color)
|
||||
.size(self.label_size.unwrap_or_default())
|
||||
.when_some(self.alpha, |this, alpha| this.alpha(alpha))
|
||||
.line_height_style(LineHeightStyle::UiLabel),
|
||||
)
|
||||
.children(self.key_binding),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue