notification: Show the close button when auto-hide is enabled (#977)
This commit is contained in:
parent
934d08c332
commit
fe342919e6
1 changed files with 15 additions and 19 deletions
|
|
@ -302,8 +302,7 @@ impl Render for Notification {
|
||||||
on_click(event, window, cx);
|
on_click(event, window, cx);
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
.when(!self.autohide, |this| {
|
.child(
|
||||||
this.child(
|
|
||||||
h_flex()
|
h_flex()
|
||||||
.absolute()
|
.absolute()
|
||||||
.top_1()
|
.top_1()
|
||||||
|
|
@ -315,12 +314,9 @@ impl Render for Notification {
|
||||||
.icon(IconName::Close)
|
.icon(IconName::Close)
|
||||||
.ghost()
|
.ghost()
|
||||||
.xsmall()
|
.xsmall()
|
||||||
.on_click(
|
.on_click(cx.listener(|this, _, window, cx| this.dismiss(window, cx))),
|
||||||
cx.listener(|this, _, window, cx| this.dismiss(window, cx)),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
})
|
|
||||||
.with_animation(
|
.with_animation(
|
||||||
ElementId::NamedInteger("slide-down".into(), closing as u64),
|
ElementId::NamedInteger("slide-down".into(), closing as u64),
|
||||||
Animation::new(Duration::from_secs_f64(0.15))
|
Animation::new(Duration::from_secs_f64(0.15))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue