From ea8bce324a1a993d5fa321362a02eec0bfc074c8 Mon Sep 17 00:00:00 2001 From: teamcons Date: Wed, 15 Apr 2026 00:09:06 +0200 Subject: [PATCH 1/4] specify reduced-motion enum --- data/Application.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/Application.css b/data/Application.css index 94257e89..d201c082 100644 --- a/data/Application.css +++ b/data/Application.css @@ -156,7 +156,7 @@ window.animated actionbar image { transition: color 750ms cubic-bezier(0.4, 0, 0.2, 1); } -@media (prefers-reduced-motion){ +@media (prefers-reduced-motion: reduce){ window.animated, window.animated overshoot, window.animated undershoot { From 2d588f914f632ffe708af439ecdc683d366e1f12 Mon Sep 17 00:00:00 2001 From: teamcons Date: Tue, 14 Apr 2026 23:03:49 +0200 Subject: [PATCH 2/4] handle in the CSS the reduce-motion setting --- data/Application.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/Application.css b/data/Application.css index d201c082..0c011ef4 100644 --- a/data/Application.css +++ b/data/Application.css @@ -156,7 +156,11 @@ window.animated actionbar image { transition: color 750ms cubic-bezier(0.4, 0, 0.2, 1); } +<<<<<<< HEAD @media (prefers-reduced-motion: reduce){ +======= +@media (prefers-reduced-motion){ +>>>>>>> 162f9db (handle in the CSS the reduce-motion setting) window.animated, window.animated overshoot, window.animated undershoot { From 5eecfcc70b286e2a17407c048e22958094242c93 Mon Sep 17 00:00:00 2001 From: teamcons Date: Tue, 14 Apr 2026 23:03:49 +0200 Subject: [PATCH 3/4] handle in the CSS the reduce-motion setting --- data/Application.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/data/Application.css b/data/Application.css index 0c011ef4..d201c082 100644 --- a/data/Application.css +++ b/data/Application.css @@ -156,11 +156,7 @@ window.animated actionbar image { transition: color 750ms cubic-bezier(0.4, 0, 0.2, 1); } -<<<<<<< HEAD @media (prefers-reduced-motion: reduce){ -======= -@media (prefers-reduced-motion){ ->>>>>>> 162f9db (handle in the CSS the reduce-motion setting) window.animated, window.animated overshoot, window.animated undershoot { From 02b861ebecbcd9d8d9d6dcb73fd41acf409284fd Mon Sep 17 00:00:00 2001 From: teamcons Date: Wed, 15 Apr 2026 00:22:25 +0200 Subject: [PATCH 4/4] handle reduceanimation in notemanager --- src/Services/NoteManager.vala | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Services/NoteManager.vala b/src/Services/NoteManager.vala index d2e62ef5..5e62d6cf 100644 --- a/src/Services/NoteManager.vala +++ b/src/Services/NoteManager.vala @@ -74,6 +74,8 @@ public class Jorts.NoteManager : Object { } saving_lock = false; + on_reduceanimation_changed (); + Gtk.Settings.get_default ().notify["enable-animations"].connect (on_reduceanimation_changed); } /*************************************************/ @@ -154,6 +156,28 @@ public class Jorts.NoteManager : Object { storage.save (array); } + /*************************************************/ + /** + * Handler to add or remove CSS animations from all active notes + */ + public void on_reduceanimation_changed () { + debug ("Reduce animation changed!"); + + if (Gtk.Settings.get_default ().gtk_enable_animations) { + foreach (var window in open_notes) { + window.add_css_class ("animated"); + } + + } else { + foreach (var window in open_notes) { + // If we remove without checking we get a critical + if ("animated" in window.css_classes) { + window.remove_css_class ("animated"); + } + } + } + } + public void action_new () { debug ("New Note"); create_note ();