Make notifications always visible with plain header

This commit is contained in:
Joshua Yuen 2026-09-12 18:25:19 -04:00
parent 28c17a0e44
commit b91dc785db
Signed by: josh
GPG Key ID: 530DA0331EFE99F5
2 changed files with 18 additions and 47 deletions

View File

@ -475,18 +475,11 @@ $module-bg: transparentize($base02, 0.4);
padding-top: 8px; padding-top: 8px;
} }
.notif-toggle { .notif-header {
padding: 4px 6px;
border-radius: 6px;
label { label {
font-weight: bold; font-weight: bold;
margin: 0 2px; margin: 0 2px;
} }
&:hover {
background: transparentize($base05, 0.88);
}
} }
.notif-clear { .notif-clear {

View File

@ -68,11 +68,6 @@ function Header() {
export default function QuickSettings(gdkmonitor: Gdk.Monitor) { export default function QuickSettings(gdkmonitor: Gdk.Monitor) {
const open = Variable(false) const open = Variable(false)
const notifOpen = Variable(false)
open.subscribe((v) => {
if (!v) notifOpen.set(false)
})
const button = ( const button = (
<button <button
@ -149,22 +144,11 @@ export default function QuickSettings(gdkmonitor: Gdk.Monitor) {
<MediaSection /> <MediaSection />
<box className="notif-section" vertical spacing={6}> <box className="notif-section" vertical spacing={6}>
<box className="notif-header-row" spacing={6}> <box className="notif-header-row" spacing={6}>
<button <box className="notif-header" spacing={6}>
className="notif-toggle"
hexpand
halign={Gtk.Align.START}
onClicked={() => notifOpen.set(!notifOpen.get())}
>
<box spacing={6}>
<icon icon="preferences-system-notifications-symbolic" /> <icon icon="preferences-system-notifications-symbolic" />
<label label="Notifications" /> <label label="Notifications" />
<icon
icon={notifOpen().as((v) =>
v ? "pan-down-symbolic" : "pan-end-symbolic",
)}
/>
</box> </box>
</button> <box hexpand />
<button <button
className="notif-clear" className="notif-clear"
onClicked={() => [...notifd.notifications].forEach((n) => n.dismiss())} onClicked={() => [...notifd.notifications].forEach((n) => n.dismiss())}
@ -172,11 +156,6 @@ export default function QuickSettings(gdkmonitor: Gdk.Monitor) {
<label label="Clear" /> <label label="Clear" />
</button> </button>
</box> </box>
<revealer
transitionType={Gtk.RevealerTransitionType.SLIDE_DOWN}
transitionDuration={180}
revealChild={bind(notifOpen)}
>
<box className="notifications" vertical> <box className="notifications" vertical>
<label <label
className="notif-empty" className="notif-empty"
@ -189,7 +168,6 @@ export default function QuickSettings(gdkmonitor: Gdk.Monitor) {
.map((n) => NotificationCard(n)), .map((n) => NotificationCard(n)),
)} )}
</box> </box>
</revealer>
</box> </box>
</Dropdown> </Dropdown>
) )