Clean up some styling issues in the editing tool card and render the animated lines a bit smaller (#30038)
Release Notes: - N/A --------- Co-authored-by: Michael Sloan <mgsloan@gmail.com>
This commit is contained in:
parent
9d1604b674
commit
91cfce09bc
1 changed files with 19 additions and 17 deletions
|
@ -581,18 +581,18 @@ impl ToolCard for EditFileToolCard {
|
||||||
(IconName::ChevronDown, "Expand Code Block")
|
(IconName::ChevronDown, "Expand Code Block")
|
||||||
};
|
};
|
||||||
|
|
||||||
let gradient_overlay = div()
|
let gradient_overlay =
|
||||||
.absolute()
|
div()
|
||||||
.bottom_0()
|
.absolute()
|
||||||
.left_0()
|
.bottom_0()
|
||||||
.w_full()
|
.left_0()
|
||||||
.h_2_5()
|
.w_full()
|
||||||
.rounded_b_lg()
|
.h_2_5()
|
||||||
.bg(gpui::linear_gradient(
|
.bg(gpui::linear_gradient(
|
||||||
0.,
|
0.,
|
||||||
gpui::linear_color_stop(cx.theme().colors().editor_background, 0.),
|
gpui::linear_color_stop(cx.theme().colors().editor_background, 0.),
|
||||||
gpui::linear_color_stop(cx.theme().colors().editor_background.opacity(0.), 1.),
|
gpui::linear_color_stop(cx.theme().colors().editor_background.opacity(0.), 1.),
|
||||||
));
|
));
|
||||||
|
|
||||||
let border_color = cx.theme().colors().border.opacity(0.6);
|
let border_color = cx.theme().colors().border.opacity(0.6);
|
||||||
|
|
||||||
|
@ -610,8 +610,9 @@ impl ToolCard for EditFileToolCard {
|
||||||
|
|
||||||
let mut container = v_flex()
|
let mut container = v_flex()
|
||||||
.p_3()
|
.p_3()
|
||||||
.gap_1p5()
|
.gap_1()
|
||||||
.border_t_1()
|
.border_t_1()
|
||||||
|
.rounded_md()
|
||||||
.border_color(border_color)
|
.border_color(border_color)
|
||||||
.bg(cx.theme().colors().editor_background);
|
.bg(cx.theme().colors().editor_background);
|
||||||
|
|
||||||
|
@ -626,7 +627,7 @@ impl ToolCard for EditFileToolCard {
|
||||||
_ => div().w_1_2(),
|
_ => div().w_1_2(),
|
||||||
}
|
}
|
||||||
.id("loading_div")
|
.id("loading_div")
|
||||||
.h_2()
|
.h_1()
|
||||||
.rounded_full()
|
.rounded_full()
|
||||||
.bg(cx.theme().colors().element_active)
|
.bg(cx.theme().colors().element_active)
|
||||||
.with_animation(
|
.with_animation(
|
||||||
|
@ -648,7 +649,7 @@ impl ToolCard for EditFileToolCard {
|
||||||
.border_1()
|
.border_1()
|
||||||
.when(failed, |card| card.border_dashed())
|
.when(failed, |card| card.border_dashed())
|
||||||
.border_color(border_color)
|
.border_color(border_color)
|
||||||
.rounded_lg()
|
.rounded_md()
|
||||||
.overflow_hidden()
|
.overflow_hidden()
|
||||||
.child(codeblock_header)
|
.child(codeblock_header)
|
||||||
.when(failed && self.error_expanded, |card| {
|
.when(failed && self.error_expanded, |card| {
|
||||||
|
@ -702,8 +703,8 @@ impl ToolCard for EditFileToolCard {
|
||||||
|editor_container| editor_container.child(gradient_overlay),
|
|editor_container| editor_container.child(gradient_overlay),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.when(is_collapsible, |editor_container| {
|
.when(is_collapsible, |card| {
|
||||||
editor_container.child(
|
card.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.id(("expand-button", self.editor_unique_id))
|
.id(("expand-button", self.editor_unique_id))
|
||||||
.flex_none()
|
.flex_none()
|
||||||
|
@ -711,6 +712,7 @@ impl ToolCard for EditFileToolCard {
|
||||||
.h_5()
|
.h_5()
|
||||||
.justify_center()
|
.justify_center()
|
||||||
.border_t_1()
|
.border_t_1()
|
||||||
|
.rounded_b_md()
|
||||||
.border_color(border_color)
|
.border_color(border_color)
|
||||||
.bg(cx.theme().colors().editor_background)
|
.bg(cx.theme().colors().editor_background)
|
||||||
.hover(|style| {
|
.hover(|style| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue