💄 floating-notifications: better appearance, use gtk's spacing instead of margin
This commit is contained in:
@@ -2,13 +2,17 @@
|
|||||||
@use "./mixins";
|
@use "./mixins";
|
||||||
|
|
||||||
.floating-notifications-container {
|
.floating-notifications-container {
|
||||||
padding: {
|
padding: 16px;
|
||||||
right: 6px;
|
|
||||||
top: 6px;
|
|
||||||
};
|
|
||||||
|
|
||||||
& .notification {
|
& .float-notification {
|
||||||
margin: 6px;
|
$radius: 18px;
|
||||||
box-shadow: 0 0 4px .5px colors.$bg-primary;
|
|
||||||
|
box-shadow: 0 0 8px 1px colors.$bg-translucent;
|
||||||
|
border-radius: $radius;
|
||||||
|
|
||||||
|
& .notification {
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: $radius;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,11 +16,15 @@ export const FloatingNotifications = (mon: number) => new Widget.Window({
|
|||||||
className: "floating-notifications-container",
|
className: "floating-notifications-container",
|
||||||
orientation: Gtk.Orientation.VERTICAL,
|
orientation: Gtk.Orientation.VERTICAL,
|
||||||
homogeneous: false,
|
homogeneous: false,
|
||||||
|
spacing: 12,
|
||||||
visible: bind(Notifications.getDefault(), "notifications").as(notifs => notifs.length > 0),
|
visible: bind(Notifications.getDefault(), "notifications").as(notifs => notifs.length > 0),
|
||||||
children: bind(Notifications.getDefault(), "notifications").as((notifs) =>
|
children: bind(Notifications.getDefault(), "notifications").as((notifs) =>
|
||||||
notifs.map((item) => NotificationWidget(item,
|
notifs.map((item) => new Widget.Box({
|
||||||
() => Notifications.getDefault().removeNotification(item),
|
className: "float-notification",
|
||||||
false, true))
|
child: NotificationWidget(item,
|
||||||
|
() => Notifications.getDefault().removeNotification(item),
|
||||||
|
false, true)
|
||||||
|
} as Widget.BoxProps))
|
||||||
),
|
),
|
||||||
} as Widget.BoxProps)
|
} as Widget.BoxProps)
|
||||||
} as Widget.WindowProps);
|
} as Widget.WindowProps);
|
||||||
|
|||||||
Reference in New Issue
Block a user