agent: Fix text wrapping in the provider set up list items (#33063)
Release Notes: - agent: Fixed text wrapping in the provider set up list items in the settings view.
This commit is contained in:
parent
ca3f1d624a
commit
2624950472
1 changed files with 21 additions and 20 deletions
|
@ -40,29 +40,30 @@ impl IntoElement for InstructionListItem {
|
|||
let link = button_link.clone();
|
||||
let unique_id = SharedString::from(format!("{}-button", self.label));
|
||||
|
||||
h_flex().flex_wrap().child(Label::new(self.label)).child(
|
||||
Button::new(unique_id, button_label)
|
||||
.style(ButtonStyle::Subtle)
|
||||
.icon(IconName::ArrowUpRight)
|
||||
.icon_size(IconSize::XSmall)
|
||||
.icon_color(Color::Muted)
|
||||
.on_click(move |_, _window, cx| cx.open_url(&link)),
|
||||
)
|
||||
h_flex()
|
||||
.flex_wrap()
|
||||
.child(Label::new(self.label))
|
||||
.child(
|
||||
Button::new(unique_id, button_label)
|
||||
.style(ButtonStyle::Subtle)
|
||||
.icon(IconName::ArrowUpRight)
|
||||
.icon_size(IconSize::XSmall)
|
||||
.icon_color(Color::Muted)
|
||||
.on_click(move |_, _window, cx| cx.open_url(&link)),
|
||||
)
|
||||
.into_any_element()
|
||||
} else {
|
||||
div().child(Label::new(self.label))
|
||||
Label::new(self.label).into_any_element()
|
||||
};
|
||||
|
||||
div()
|
||||
.child(
|
||||
ListItem::new("list-item")
|
||||
.selectable(false)
|
||||
.start_slot(
|
||||
Icon::new(IconName::Dash)
|
||||
.size(IconSize::XSmall)
|
||||
.color(Color::Hidden),
|
||||
)
|
||||
.child(item_content),
|
||||
ListItem::new("list-item")
|
||||
.selectable(false)
|
||||
.start_slot(
|
||||
Icon::new(IconName::Dash)
|
||||
.size(IconSize::XSmall)
|
||||
.color(Color::Hidden),
|
||||
)
|
||||
.into_any()
|
||||
.child(div().w_full().child(item_content))
|
||||
.into_any_element()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue