Update notifications control area style and changed notifs icon position on bar.

This commit is contained in:
Jas Singh
2024-06-25 01:39:59 -07:00
parent c1d7fc4f95
commit 2b8eb9144d
6 changed files with 54 additions and 36 deletions

View File

@@ -52,8 +52,8 @@ const Right = () => {
BarItemBox(Bluetooth()),
BarItemBox(BatteryLabel()),
BarItemBox(SysTray()),
BarItemBox(Clock()),
BarItemBox(Notifications()),
BarItemBox(Clock()),
BarItemBox(Power()),
],
});

View File

@@ -50,6 +50,30 @@ export default () => {
notifs.dnd = !active;
},
}),
Widget.Box({
children: notifs.bind("notifications").as((n) => {
if (n.length > 0) {
return [
Widget.Separator({
hpack: "center",
vexpand: true,
vertical: true,
class_name:
"menu-separator notification-controls",
}),
Widget.Button({
class_name: "clear-notifications-button",
on_primary_click: () => notifs.clear(),
child: Widget.Label({
class_name: "clear-notifications-label",
label: "",
}),
}),
];
}
return [];
}),
}),
],
}),
],
@@ -57,24 +81,6 @@ export default () => {
Widget.Separator({
class_name: "menu-separator notifications",
}),
Widget.Box({
hpack: "end",
children: notifs.bind("notifications").as((n) => {
if (n.length > 0) {
return [
Widget.Button({
class_name: "clear-notifications-button",
on_primary_click: () => notifs.clear(),
child: Widget.Label({
class_name: "clear-notifications-label",
label: "clear",
}),
}),
];
}
return [];
}),
}),
Widget.Box({
class_name: "menu-content-container notifications",
hpack: "center",

View File

@@ -9,7 +9,6 @@ export default () => {
class_name: "notifications-window",
layer: "top",
anchor: ["top", "right"],
monitor: 2,
exclusivity: "ignore",
child: Widget.Box({
class_name: "notification-card-container",