refactor(notifications): improve notification UX

This commit is contained in:
tux
2025-09-26 13:28:22 +05:30
parent cb09eb5353
commit a24b448560
2 changed files with 15 additions and 1 deletions

View File

@@ -12,6 +12,16 @@ window.notifications {
min-width: 20rem; min-width: 20rem;
.header { .header {
.close {
padding: 10px;
background: $inactive-color;
border-radius: $rounded;
&:hover {
background: $bg-color;
}
}
.app-icon { .app-icon {
-gtk-icon-size: 2rem; -gtk-icon-size: 2rem;
} }

View File

@@ -57,7 +57,11 @@ export const Notification = ({ n }: { n: AstalNotifd.Notification }) => {
label={n.appName || "Unknown"} label={n.appName || "Unknown"}
/> />
<label class="time" hexpand halign={END} label={time(n.time)} /> <label class="time" hexpand halign={END} label={time(n.time)} />
<button onClicked={() => n.dismiss()}> <button
class="close"
onClicked={() => n.dismiss()}
cursor={Gdk.Cursor.new_from_name("pointer", null)}
>
<image iconName="window-close-symbolic" /> <image iconName="window-close-symbolic" />
</button> </button>
</box> </box>