Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install Dependencies
run: |
apt update
apt install -y libadwaita-1-dev libcanberra-dev libgranite-7-dev libgtk-4-dev meson valac
apt install -y libadwaita-1-dev libcanberra-dev libgranite-9-dev libgtk-4-dev meson valac
- name: Build
env:
DESTDIR: out
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ a Gtk notification server for Pantheon

You'll need the following dependencies:
* libcanberra
* libgranite-7-dev (>=7.7.0)
* libgranite-9-dev (>=9.0.0)
* libgtk-4-dev
* libadwaita-1-dev (>=1.0.0)
* meson
Expand Down
44 changes: 26 additions & 18 deletions data/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ window,
padding: 3px;
border: none;
border-radius: 100%;
background: @BLACK_500;
background: var(--BLACK_500);
box-shadow:
inset 0 0 0 1px alpha(#fff, 0.02),
inset 0 1px 0 0 alpha(#fff, 0.07),
inset 0 -1px 0 0 alpha(#fff, 0.01),
0 0 0 1px alpha(#000, 0.7),
0 1px 2px alpha(#000, 0.16),
0 2px 3px alpha(#000, 0.23);
inset 0 0 0 1px color-mix(in srgb, white 2%, transparent),
inset 0 1px 0 0 color-mix(in srgb, white 7%, transparent),
inset 0 -1px 0 0 color-mix(in srgb, white 01%, transparent),
0 0 0 1px color-mix(in srgb, black 7%, transparent),
0 1px 2px color-mix(in srgb, black 16%, transparent),
0 2px 3px color-mix(in srgb, black 23%, transparent);
margin: 3px;
-gtk-icon-size: 24px;
}

.close image {
color: #fff;
-gtk-icon-shadow: 0 1px 1px alpha(#000, 0.6);
-gtk-icon-shadow: 0 1px 1px alpha(black, 0.6);
}

.notification stack > box,
Expand All @@ -38,22 +38,30 @@ window,
}

.notification .draw-area {
background: alpha(@base_color, 0.8);
border-radius: 9px;
background: color-mix(in srgb, var(--base-color) 80%, transparent);
border-radius: 1em;
box-shadow:
inset 0 -1px 0 0 alpha(@highlight_color, 0.4),
inset 0 1px 0 0 alpha(@highlight_color, 0.6),
inset 1px 0 0 0 alpha(@highlight_color, 0.14),
inset -1px 0 0 0 alpha(@highlight_color, 0.14),
0 0 0 1px @borders,
0 1px 3px alpha(black, 0.2),
0 3px 9px alpha(black, 0.3);
inset 0 -2px 0 -1px color-mix(in srgb, var(--highlight-color) 40%, transparent),
inset 0 2px 0 -1px color-mix(in srgb, var(--highlight-color) 60%, transparent),
inset 1px 0 0 0 color-mix(in srgb, var(--highlight-color) 10%, transparent),
inset -1px 0 0 0 color-mix(in srgb, var(--highlight-color) 10%, transparent),
0 0 0 1px var(--border-color),
0 1px 3px color-mix(in srgb, black 20%, transparent),
0 3px 9px color-mix(in srgb, black 30%, transparent);
margin: 16px;
}

.notification .draw-area label.title {
font-weight: 700;
}

.notification .draw-area label.title image {
color: color-mix(in srgb, var(--fg-color) 78%, transparent);
}

.notification.reduce-transparency .draw-area {
margin: 16px;
background: @base_color;
background: var(--base-color);
}

.notification:not(.confirmation) .draw-area image {
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ executable(
dependency ('glib-2.0'),
dependency ('gobject-2.0'),
dependency ('gio-2.0'),
dependency ('granite-7', version: '>=7.7.0'),
dependency ('granite-9', version: '>=9.0.0'),
dependency ('gtk4'),
dependency('gtk4-wayland'),
dependency('gtk4-x11'),
Expand Down
9 changes: 6 additions & 3 deletions src/Bubble.vala
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ public class Notifications.Bubble : AbstractBubble {

var contents = new Contents (value);

if (value.priority == URGENT) {
contents.add_css_class ("urgent");
} else {
if (value.priority != URGENT) {
timeout = 4000;
}

Expand Down Expand Up @@ -162,6 +160,11 @@ public class Notifications.Bubble : AbstractBubble {

attach (action_area, 0, 2, 2);
}

if (notification.priority == URGENT) {
add_css_class ("urgent");
title_label.add_css_class (Granite.CssClass.ERROR);
}
}
}
}
Loading