From bf0578e32a44a43d7626dafd5c31851dc571ddba Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Fri, 17 Jan 2025 16:56:45 -0700 Subject: [PATCH] Remove gap in layout of notifications (#23303) * Increases width of notification message to remove a gap * Puts the close button in the top right Release Notes: - N/A Co-authored-by: Nate --- crates/workspace/src/notifications.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/workspace/src/notifications.rs b/crates/workspace/src/notifications.rs index 0ccb2a58a0e4ff13dc3febf697bdc08023fcd56d..b2a9c6d6c81e641edb3f0f40b7d1b388ee2f5f85 100644 --- a/crates/workspace/src/notifications.rs +++ b/crates/workspace/src/notifications.rs @@ -284,6 +284,7 @@ impl Render for LanguageServerPrompt { .child( h_flex() .justify_between() + .items_start() .child( h_flex() .gap_2() @@ -396,7 +397,7 @@ impl Render for ErrorMessagePrompt { .child( div() .id("error_message") - .max_w_80() + .max_w_96() .max_h_40() .overflow_y_scroll() .child(Label::new(self.message.clone()).size(LabelSize::Small)), @@ -503,7 +504,8 @@ pub mod simple_message_notification { h_flex() .gap_4() .justify_between() - .child(div().max_w_80().child((self.content)(cx))) + .items_start() + .child(div().max_w_96().child((self.content)(cx))) .child( IconButton::new("close", IconName::Close) .on_click(cx.listener(|this, _, cx| this.dismiss(cx))),