diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rs index 452538b9103e99f1f8dd281ffcfb26f35e2f9540..385c6f5239435d968b2fd9baa28c96b069d3eab9 100644 --- a/crates/assistant/src/assistant_panel.rs +++ b/crates/assistant/src/assistant_panel.rs @@ -2325,12 +2325,16 @@ impl ConversationEditor { } }); - h_stack() + div() + .h_flex() .id(("message_header", message_id.0)) .h_11() + .relative() .gap_1() - .p_1() - .child(sender) + // Sender is a button with a padding of 1, but only has a background on hover, + // so we shift it left by the same amount to align the text with the content + // in the un-hovered state. + .child(div().child(sender).relative().neg_left_1()) // TODO: Only show this if the message if the message has been sent .child( Label::new( @@ -2538,7 +2542,7 @@ impl Render for ConversationEditor { .child( div() .size_full() - .pl_2() + .pl_4() .bg(cx.theme().colors().editor_background) .child(self.editor.clone()), ) diff --git a/crates/gpui/src/style.rs b/crates/gpui/src/style.rs index 7e9504d43466570d96ad5441263c8d02b2e555e2..244ccebf2498fb9ff275d0818215a9ba658ffc02 100644 --- a/crates/gpui/src/style.rs +++ b/crates/gpui/src/style.rs @@ -561,6 +561,12 @@ impl From for Fill { } } +impl From for Fill { + fn from(color: Rgba) -> Self { + Self::Color(color.into()) + } +} + impl From for HighlightStyle { fn from(other: TextStyle) -> Self { Self::from(&other)