From 4e5aaf1dc299c332e52b24a1346ad6a94ec88b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Tue, 8 Sep 2026 09:48:13 -0700 Subject: [PATCH 1/5] Update for Granite 9 --- .github/workflows/main.yml | 2 +- data/application.css | 36 ++++++++++++++++++------------------ meson.build | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 281bb1b..26e18f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/data/application.css b/data/application.css index 8c34231..5d5ee9b 100644 --- a/data/application.css +++ b/data/application.css @@ -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 20%, 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, @@ -38,22 +38,22 @@ window, } .notification .draw-area { - background: alpha(@base_color, 0.8); + background: color-mix(in srgb, var(--base-color) 80%, transparent); border-radius: 9px; 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 -1px 0 0 color-mix(in srgb, var(--highlight-color) 40%, transparent), + inset 0 1px 0 0 color-mix(in srgb, var(--highlight-color) 60%, transparent), + inset 1px 0 0 0 color-mix(in srgb, var(--highlight-color) 14%, transparent), + inset -1px 0 0 0 color-mix(in srgb, var(--highlight-color) 14%, 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.reduce-transparency .draw-area { margin: 16px; - background: @base_color; + background: var(--base-color); } .notification:not(.confirmation) .draw-area image { @@ -84,7 +84,7 @@ masked-image { margin: 5px 4px 3px; } -@keyframes urgent { +var(--keyframes urgent { 0% { -gtk-icon-transform: scale(1) rotate(0deg); } 10% { -gtk-icon-transform: scale(0.8) rotate(30deg); } 20% { -gtk-icon-transform: scale(1.2) rotate(-30deg); } diff --git a/meson.build b/meson.build index d869ee2..eb553b2 100644 --- a/meson.build +++ b/meson.build @@ -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'), From 678042268380e69d69ce822fbdb71930a9592c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Tue, 8 Sep 2026 09:48:55 -0700 Subject: [PATCH 2/5] unbreak keyframes --- data/application.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/application.css b/data/application.css index 5d5ee9b..f774b37 100644 --- a/data/application.css +++ b/data/application.css @@ -84,7 +84,7 @@ masked-image { margin: 5px 4px 3px; } -var(--keyframes urgent { +@keyframes urgent { 0% { -gtk-icon-transform: scale(1) rotate(0deg); } 10% { -gtk-icon-transform: scale(0.8) rotate(30deg); } 20% { -gtk-icon-transform: scale(1.2) rotate(-30deg); } From 5929bf0371032b25fe791de6ca1a2d999bb71b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Tue, 8 Sep 2026 10:23:11 -0700 Subject: [PATCH 3/5] Take styles from old stylesheet --- data/application.css | 10 +++++++++- src/Bubble.vala | 9 ++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/data/application.css b/data/application.css index f774b37..f451123 100644 --- a/data/application.css +++ b/data/application.css @@ -12,7 +12,7 @@ window, border-radius: 100%; background: var(--BLACK_500); box-shadow: - inset 0 0 0 1px color-mix(in srgb, white 20%, transparent), + 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), @@ -51,6 +51,14 @@ window, 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: var(--base-color); diff --git a/src/Bubble.vala b/src/Bubble.vala index 533a521..4f35538 100644 --- a/src/Bubble.vala +++ b/src/Bubble.vala @@ -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; } @@ -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); + } } } } From 5a9c9514c01dffedacc75ac9902b3cf9b853e730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Tue, 8 Sep 2026 10:27:34 -0700 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d714a1..388e1e6 100644 --- a/README.md +++ b/README.md @@ -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 From 943f97d9b7ac559f11f163c24325bd6cc143ed88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Tue, 8 Sep 2026 11:16:42 -0700 Subject: [PATCH 5/5] smoother highlights --- data/application.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/application.css b/data/application.css index f451123..ffe0d74 100644 --- a/data/application.css +++ b/data/application.css @@ -39,12 +39,12 @@ window, .notification .draw-area { background: color-mix(in srgb, var(--base-color) 80%, transparent); - border-radius: 9px; + border-radius: 1em; box-shadow: - inset 0 -1px 0 0 color-mix(in srgb, var(--highlight-color) 40%, transparent), - inset 0 1px 0 0 color-mix(in srgb, var(--highlight-color) 60%, transparent), - inset 1px 0 0 0 color-mix(in srgb, var(--highlight-color) 14%, transparent), - inset -1px 0 0 0 color-mix(in srgb, var(--highlight-color) 14%, transparent), + 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);