From ed05e9af2515c3c1c09becae5b405fc5074aa5e9 Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Thu, 16 Jan 2025 18:47:23 +1100
Subject: notifications: make popup window

---
 src/widgets/notification.tsx | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

(limited to 'src/widgets/notification.tsx')

diff --git a/src/widgets/notification.tsx b/src/widgets/notification.tsx
index 0bef5ca..adac831 100644
--- a/src/widgets/notification.tsx
+++ b/src/widgets/notification.tsx
@@ -57,12 +57,16 @@ export default class Notification extends Widget.Box {
     #destroyed = false;
 
     constructor({ notification, popup }: { notification: AstalNotifd.Notification; popup?: boolean }) {
-        super();
+        super({ className: "notification" });
 
         this.#revealer = (
-            <revealer revealChild transitionType={Gtk.RevealerTransitionType.SLIDE_DOWN} transitionDuration={150}>
+            <revealer
+                revealChild={popup}
+                transitionType={Gtk.RevealerTransitionType.SLIDE_DOWN}
+                transitionDuration={150}
+            >
                 <box className="wrapper">
-                    <box vertical className={`notification ${urgencyToString(notification.urgency)}`}>
+                    <box vertical className={`inner ${urgencyToString(notification.urgency)}`}>
                         <box className="header">
                             <AppIcon appIcon={notification.appIcon} desktopEntry={notification.appName} />
                             <label className="app-name" label={notification.appName ?? "Unknown"} />
@@ -101,6 +105,7 @@ export default class Notification extends Widget.Box {
         const width = this.get_preferred_width()[1];
         this.css = `margin-left: ${width}px; margin-right: -${width}px;`;
         timeout(1, () => {
+            this.#revealer.revealChild = true;
             this.css = `transition: 300ms cubic-bezier(0.05, 0.9, 0.1, 1.1); margin-left: 0; margin-right: 0;`;
         });
 
-- 
cgit v1.2.3-freya

