.
This commit is contained in:
@@ -8,7 +8,7 @@ use gpui::{
|
||||
Animation, AnimationExt, AnyElement, App, AppContext, ClickEvent, Context, DismissEvent,
|
||||
ElementId, Entity, EventEmitter, InteractiveElement as _, IntoElement, ParentElement as _,
|
||||
Render, SharedString, StatefulInteractiveElement, StyleRefinement, Styled, Subscription,
|
||||
Window, div, px,
|
||||
Window, div, px, relative,
|
||||
};
|
||||
use theme::{ActiveTheme, Anchor};
|
||||
|
||||
@@ -332,7 +332,7 @@ impl Render for Notification {
|
||||
.items_start()
|
||||
.refine_style(&self.style)
|
||||
.when_some(icon, |this, icon| {
|
||||
this.child(div().flex_shrink_0().pt(px(3.)).child(icon))
|
||||
this.child(div().flex_shrink_0().child(icon))
|
||||
})
|
||||
.child(
|
||||
v_flex()
|
||||
@@ -342,7 +342,7 @@ impl Render for Notification {
|
||||
this.child(div().text_sm().font_semibold().child(title))
|
||||
})
|
||||
.when_some(self.message.clone(), |this, message| {
|
||||
this.child(div().text_sm().child(message))
|
||||
this.child(div().text_sm().line_height(relative(1.25)).child(message))
|
||||
})
|
||||
.when_some(content, |this, content| this.child(content))
|
||||
.when_some(action, |this, action| {
|
||||
@@ -352,8 +352,8 @@ impl Render for Notification {
|
||||
.child(
|
||||
div()
|
||||
.absolute()
|
||||
.top_2p5()
|
||||
.right_2p5()
|
||||
.top_2()
|
||||
.right_2()
|
||||
.invisible()
|
||||
.group_hover("", |this| this.visible())
|
||||
.child(
|
||||
@@ -361,7 +361,9 @@ impl Render for Notification {
|
||||
.icon(IconName::Close)
|
||||
.ghost()
|
||||
.xsmall()
|
||||
.on_click(cx.listener(|this, _, window, cx| this.dismiss(window, cx))),
|
||||
.on_click(cx.listener(move |this, _ev, window, cx| {
|
||||
this.dismiss(window, cx);
|
||||
})),
|
||||
),
|
||||
)
|
||||
.when_some(self.on_click.clone(), |this, on_click| {
|
||||
|
||||
Reference in New Issue
Block a user