diff options
Diffstat (limited to 'src/widgets/notification.tsx')
| -rw-r--r-- | src/widgets/notification.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/widgets/notification.tsx b/src/widgets/notification.tsx index b2a10be..0dfd368 100644 --- a/src/widgets/notification.tsx +++ b/src/widgets/notification.tsx @@ -1,4 +1,5 @@ import { desktopEntrySubs } from "@/utils/icons"; +import Thumbnailer from "@/utils/thumbnailer"; import { setupCustomTooltip } from "@/utils/widgets"; import { bind, GLib, register, timeout, Variable } from "astal"; import { Astal, Gtk, Widget } from "astal/gtk3"; @@ -58,9 +59,11 @@ const Image = ({ compact, icon }: { compact?: boolean; icon: string }) => { <box valign={Gtk.Align.START} className={`image ${compact ? "small" : ""}`} - css={` - background-image: url("${icon}"); - `} + setup={self => + Thumbnailer.thumbnail(icon) + .then(p => (self.css = `background-image: url("${p}");`)) + .catch(console.error) + } /> ); if (Astal.Icon.lookup_icon(icon)) |