Make notifications always visible with plain header
This commit is contained in:
parent
552218329e
commit
85309c1b3c
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue