This commit is contained in:
sankalp committed 2024-07-15 05:41:01 +05:45
1 parent a3afc580ac
commit 3cc23a89e0
4 files changed
+29 -8

No files matched your search

+1 -2
View File
@@ -229,8 +229,7 @@ function SysTray() {
const items = systemtray.items;
// @ts-expect-error
self.children = items.map((item) => {
if (!item.id)
return undefined;
if (!item.id) return undefined;
if (item.id.trim() != "nm-applet" && item.id.trim() != "blueman") {
return Widget.Button({
child: Widget.Icon({ icon: item.bind("icon") }),
+15 -4
View File
@@ -155,11 +155,13 @@ const NotificationReveal = (notification: NotificationType, visible = false, dis
count: number;
id: number;
app: string;
destroying: boolean;
};
let box: Box<any, BoxAttrs>;
const destroyWithAnims = () => {
box.attribute.destroying = true;
secondRevealer.reveal_child = false;
timeout(transition_duration, () => {
firstRevealer.reveal_child = false;
@@ -175,7 +177,8 @@ const NotificationReveal = (notification: NotificationType, visible = false, dis
destroyWithAnims: destroyWithAnims,
count: 0,
id: notification.id,
app: notification.app_name
app: notification.app_name,
destroying: false
},
children: [firstRevealer]
});
@@ -206,17 +209,24 @@ export function NotificationPopups(
const prev = list.children[i - 1];
let is_last = true;
let is_first = true;
if (next) {
let margin_bottom = false;
if (next && !next?.attribute.destroying) {
if (next.attribute.app === current.attribute.app) {
is_last = false;
}
}
if (prev) {
if (prev && !prev?.attribute.destroying) {
if (prev.attribute.app === current.attribute.app) {
is_first = false;
}
}
if (next) {
if (!(next.attribute.app === current.attribute.app)) {
margin_bottom = true;
}
}
current.toggleClassName("last", is_last);
current.toggleClassName("margin_bottom", margin_bottom);
current.toggleClassName("first", is_first);
current.toggleClassName("middle", !is_first && !is_last);
}
@@ -256,7 +266,8 @@ export function NotificationPopups(
if (original.attribute.count <= 0) {
original.attribute.destroyWithAnims();
}
original.connect("destroy", () => onChange())
onChange();
original.connect("destroy", () => onChange());
}
list.hook(notifications, onNotified, "notified").hook(notifications, onDismissed, dismiss ? "dismissed" : "closed");
@@ -39,11 +39,13 @@ const NotificationReveal = (notification: NotificationType, visible = false, dis
count: number;
id: number;
app: string;
destroying: boolean;
};
let box: Box<any, BoxAttrs>;
const destroyWithAnims = () => {
box.attribute.destroying = true;
secondRevealer.reveal_child = false;
Utils.timeout(transition_duration, () => {
firstRevealer.reveal_child = false;
@@ -58,7 +60,8 @@ const NotificationReveal = (notification: NotificationType, visible = false, dis
destroyWithAnims: destroyWithAnims,
count: 0,
id: notification.id,
app: notification.app_name
app: notification.app_name,
destroying: false
},
children: [firstRevealer]
});
+9 -1
View File
@@ -533,12 +533,15 @@ window.notification-popups box.notifications {
transition: all 0.2s ease-in-out, border-radius 0.1s ease-in-out;
}
.notifications_sidebar_scrollable viewport > box > .first .notification{
.notifications_sidebar_scrollable viewport > box > .first .notification {
border-radius: 14px 14px 6px 6px;
}
.notifications_sidebar_scrollable viewport > box > .last .notification {
border-radius: 6px 6px 14px 14px;
}
.notifications_sidebar_scrollable viewport > box > .margin_bottom .notification {
margin-bottom: 10px;
}
@@ -1421,6 +1424,10 @@ switch:checked:active slider {
margin-left: 2px;
}
.sideleft .message label {
color: @onSurface;
}
.sideleft .message.ephemeral {
background-color: @surface;
box-shadow: none;
@@ -1511,6 +1518,7 @@ switch:checked:active slider {
}
}
/* -----------------------------------------------------
* Material
* ----------------------------------------------------- */