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 <nate@zed.dev>
This commit is contained in:
parent
e338a177c5
commit
bf0578e32a
1 changed files with 4 additions and 2 deletions
|
@ -284,6 +284,7 @@ impl Render for LanguageServerPrompt {
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.justify_between()
|
.justify_between()
|
||||||
|
.items_start()
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.gap_2()
|
.gap_2()
|
||||||
|
@ -396,7 +397,7 @@ impl Render for ErrorMessagePrompt {
|
||||||
.child(
|
.child(
|
||||||
div()
|
div()
|
||||||
.id("error_message")
|
.id("error_message")
|
||||||
.max_w_80()
|
.max_w_96()
|
||||||
.max_h_40()
|
.max_h_40()
|
||||||
.overflow_y_scroll()
|
.overflow_y_scroll()
|
||||||
.child(Label::new(self.message.clone()).size(LabelSize::Small)),
|
.child(Label::new(self.message.clone()).size(LabelSize::Small)),
|
||||||
|
@ -503,7 +504,8 @@ pub mod simple_message_notification {
|
||||||
h_flex()
|
h_flex()
|
||||||
.gap_4()
|
.gap_4()
|
||||||
.justify_between()
|
.justify_between()
|
||||||
.child(div().max_w_80().child((self.content)(cx)))
|
.items_start()
|
||||||
|
.child(div().max_w_96().child((self.content)(cx)))
|
||||||
.child(
|
.child(
|
||||||
IconButton::new("close", IconName::Close)
|
IconButton::new("close", IconName::Close)
|
||||||
.on_click(cx.listener(|this, _, cx| this.dismiss(cx))),
|
.on_click(cx.listener(|this, _, cx| this.dismiss(cx))),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue