local qvars = require "quarrel.vars" local wibox = require "wibox" local dnd = require "services.dnd" local qcolor = require "quarrel.color" local phosphor = require "assets.phosphor" local qui = require "quarrel.ui" local qdebug = require "quarrel.debug" local w = wibox.widget { widget = wibox.container.background, shape = qui.shape, qui.padded { widget = wibox.container.place, qui.icon { icon = phosphor.bell_simple_slash_fill, color = qcolor.palette.bg(), widget = { forced_height = qui.CHAR_HEIGHT - qui.PADDING * 2, forced_width = qui.CHAR_HEIGHT - qui.PADDING * 2 } } }, -- visible = false } dnd:connect_signal("dnd", function (_, value) -- this is a giant hack -- why is it here? cause otherwise the align layout freaks out -- and counts the hidden widget when reserving space *and* when drawing, offsetting the rest of the widgets in the process -- w.visible = value w.bg = qcolor.palette[value and "yellow" or "bg"]() end) return w