make notifications hide on click

This commit is contained in:
gnat 2024-12-15 19:06:37 -08:00
parent 2a8070cc08
commit 4763fc0624
2 changed files with 55 additions and 51 deletions

View File

@ -21,8 +21,11 @@ local notification_icon = function(n)
end end
local make_notification = function(n) local make_notification = function(n)
print(n:get_urgency()) local layout = Widget.Button({
local layout = Widget.Box({ on_clicked = function(self)
self:get_parent():set_reveal_child(false)
end,
child = Widget.Box({
children = { children = {
Widget.Box({ Widget.Box({
vertical = true, vertical = true,
@ -72,6 +75,7 @@ local make_notification = function(n)
}) })
} }
}) })
})
return Widget.Revealer({ return Widget.Revealer({
transition_type = 'SLIDE_DOWN', transition_type = 'SLIDE_DOWN',

View File

@ -1,6 +1,6 @@
.notifications { .notifications {
> * { > * {
> box { > button > box {
margin: 10px 15px; margin: 10px 15px;
border: 1px solid $fg; border: 1px solid $fg;
background: $bg; background: $bg;