Revamped Notification and NotificationCenter
This commit is contained in:
1 parent
5e950a98bd
commit
855dd2859f
3 files changed
+42
-27
No files matched your search
@@ -139,10 +139,10 @@ class NotificationWidget(Box):
|
|||||||
children=CustomImage(
|
children=CustomImage(
|
||||||
pixbuf=(
|
pixbuf=(
|
||||||
notification.image_pixbuf.scale_simple(
|
notification.image_pixbuf.scale_simple(
|
||||||
48, 48, GdkPixbuf.InterpType.BILINEAR
|
35, 35, GdkPixbuf.InterpType.BILINEAR
|
||||||
)
|
)
|
||||||
if notification.image_pixbuf
|
if notification.image_pixbuf
|
||||||
else self.get_pixbuf(notification.app_icon, 48, 48)
|
else self.get_pixbuf(notification.app_icon, 35, 35)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -161,12 +161,12 @@ class NotificationWidget(Box):
|
|||||||
h_align="start",
|
h_align="start",
|
||||||
ellipsization="end",
|
ellipsization="end",
|
||||||
),
|
),
|
||||||
Label(
|
# Label(
|
||||||
name="notification-app-name",
|
# name="notification-app-name",
|
||||||
markup=" | " + notification.app_name,
|
# markup=" | " + notification.app_name,
|
||||||
h_align="start",
|
# h_align="start",
|
||||||
ellipsization="end",
|
# ellipsization="end",
|
||||||
),
|
# ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -185,11 +185,19 @@ class NotificationWidget(Box):
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Box(h_expand=True),
|
Box(h_expand=True),
|
||||||
Button(
|
Box(
|
||||||
name="notification-close-button",
|
orientation="v",
|
||||||
image=CustomImage(icon_name="close-symbolic", icon_size=18),
|
children=[
|
||||||
visible=True, # Initially hidden
|
Button(
|
||||||
on_clicked=lambda *_: self.notification.close("dismissed-by-user"),
|
name="notification-close-button",
|
||||||
|
image=CustomImage(icon_name="close-symbolic", icon_size=18),
|
||||||
|
visible=True, # Initially hidden
|
||||||
|
on_clicked=lambda *_: self.notification.close(
|
||||||
|
"dismissed-by-user"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Box(v_expand=True),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
background-color: alpha(#fff, 0.09);
|
background-color: alpha(#fff, 0.09);
|
||||||
|
|
||||||
border: 1px solid alpha(#111, 0.3);
|
border: 1px solid alpha(#111, 0.3);
|
||||||
border-radius: 16px;
|
border-radius: 10px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
margin: 6px;
|
/* margin: 6px; */
|
||||||
}
|
}
|
||||||
|
|
||||||
#noti-clear-button {
|
#noti-clear-button {
|
||||||
min-width: 10px;
|
min-width: 10px;
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
border-radius: 50px;
|
border-radius: 10px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/* Stacked notification group styles */
|
/* Stacked notification group styles */
|
||||||
.stacked-notification-group {
|
.stacked-notification-group {
|
||||||
margin: 8px 0;
|
margin: 4px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stacked-notification-container {
|
.stacked-notification-container {
|
||||||
|
|||||||
+17
-10
@@ -1,23 +1,29 @@
|
|||||||
#notification {
|
#notification {
|
||||||
padding: 16px;
|
padding: 10px;
|
||||||
background-color: alpha(#fff, 0.03);
|
background-color: alpha(#fff, 0.03);
|
||||||
border-radius: 20px;
|
border-radius: 8px;
|
||||||
margin: 4px;
|
margin-top: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
/* margin: 5px; */
|
||||||
}
|
}
|
||||||
|
|
||||||
#notification-action-buttons button.start-action {
|
#notification-close-button {
|
||||||
border-radius: 20px;
|
background-color: alpha(#999, 0.3);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
#notification-close-button:hover {
|
||||||
|
background-color: alpha(#2369ff, 0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
#notification-action-buttons button {
|
#notification-action-buttons button {
|
||||||
background-color: alpha(#999, 0.3);
|
background-color: alpha(#999, 0.3);
|
||||||
padding: 8px;
|
padding: 4px;
|
||||||
border-radius: 20px;
|
border-radius: 7px;
|
||||||
transition: background-color 0.1s ease;
|
transition: background-color 0.1s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
#notification-action-buttons button:hover {
|
#notification-action-buttons button:hover {
|
||||||
background-color: alpha(#000, 0.3);
|
background-color: alpha(#2369ff, 0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
#notification-action-buttons button:active {
|
#notification-action-buttons button:active {
|
||||||
@@ -35,16 +41,17 @@
|
|||||||
|
|
||||||
#notification-summary,
|
#notification-summary,
|
||||||
#button-label {
|
#button-label {
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#notification-summary {
|
#notification-summary {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: var(--primary);
|
font-size: 16px;
|
||||||
|
/* color: var(--primary); */
|
||||||
}
|
}
|
||||||
|
|
||||||
#notification-app-name {
|
#notification-app-name {
|
||||||
color: var(--outline);
|
color: var(--outline);
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
#action-button {
|
#action-button {
|
||||||
|
|||||||
Reference in new issue
Block a user