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(Bluetooth()),
BarItemBox(BatteryLabel()), BarItemBox(BatteryLabel()),
BarItemBox(SysTray()), BarItemBox(SysTray()),
BarItemBox(Clock()),
BarItemBox(Notifications()), BarItemBox(Notifications()),
BarItemBox(Clock()),
BarItemBox(Power()), BarItemBox(Power()),
], ],
}); });

View File

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

View File

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

View File

@@ -19,6 +19,8 @@
.notification-menu-controls { .notification-menu-controls {
margin: 0em 1em; margin: 0em 1em;
margin-top: 0.6em;
margin-bottom: 0.4em;
} }
.notification-card.menu { .notification-card.menu {
@@ -33,14 +35,20 @@
.menu-label.notifications { .menu-label.notifications {
color: $lavender; color: $lavender;
margin: 0.9em 0.5em; margin: 0em;
margin-bottom: 0.7em;
} }
.menu-separator.notifications { .menu-separator.notifications {
background-color: $surface0; background-color: $surface0;
margin: 0em 1em; margin: 0em 1em;
} }
.menu-separator.notification-controls {
min-width: 0.1em;
background-color: $surface0;
margin: 0em 1em;
}
.menu-switch.notifications:checked { .menu-switch.notifications:checked {
&:checked { &:checked {
background: $lavender; background: $lavender;
@@ -48,8 +56,7 @@
} }
.clear-notifications-button { .clear-notifications-button {
margin-right: 1em; margin-right: 0.3em;
margin-top: 0.4em;
&:hover label { &:hover label {
color: $maroon; color: $maroon;
@@ -57,8 +64,8 @@
} }
.clear-notifications-label { .clear-notifications-label {
color: $lavender; color: $red;
font-size: 0.9em; font-size: 1.5em;
} }
.top-right-event-box_top *{ .top-right-event-box_top *{

View File

@@ -1057,6 +1057,8 @@ image {
.notification-menu-controls { .notification-menu-controls {
margin: 0em 1em; margin: 0em 1em;
margin-top: 0.6em;
margin-bottom: 0.4em;
} }
.notification-card.menu { .notification-card.menu {
@@ -1071,8 +1073,7 @@ image {
.menu-label.notifications { .menu-label.notifications {
color: #b4befe; color: #b4befe;
margin: 0.9em 0.5em; margin: 0em;
margin-bottom: 0.7em;
} }
.menu-separator.notifications { .menu-separator.notifications {
@@ -1080,21 +1081,26 @@ image {
margin: 0em 1em; margin: 0em 1em;
} }
.menu-separator.notification-controls {
min-width: 0.1em;
background-color: #313244;
margin: 0em 1em;
}
.menu-switch.notifications:checked:checked { .menu-switch.notifications:checked:checked {
background: #b4befe; background: #b4befe;
} }
.clear-notifications-button { .clear-notifications-button {
margin-right: 1em; margin-right: 0.3em;
margin-top: 0.4em;
} }
.clear-notifications-button:hover label { .clear-notifications-button:hover label {
color: #eba0ac; color: #eba0ac;
} }
.clear-notifications-label { .clear-notifications-label {
color: #b4befe; color: #f38ba8;
font-size: 0.9em; font-size: 1.5em;
} }
.top-right-event-box_top * { .top-right-event-box_top * {

File diff suppressed because one or more lines are too long