From 0669456067ca068071f54750ee894323a88ab6d3 Mon Sep 17 00:00:00 2001 From: Jason Perlow Date: Mon, 23 Nov 2026 14:20:47 -0500 Subject: [PATCH] feat: add an animated icons switch to desktop settings Add an Animated Icons switch to Settings > Desktop, next to Show Desktop Icons, bound to the dev.sinty.desktop animated-icons key. The row is only added when the installed schema has the key, so a shell running against an older schema does not abort when the page opens. The test schema mirror gets the key too. Assisted-by: zoder:qwen38 Assisted-by: zoder:gemma4-31b AI-Scope: generated the SwitchRow in desktop_page.vala and the mirror schema key, and the has_key guard around the row; prompts: add the animated-icons settings row, then guard it against a missing key. --- src/components/sidebar/pages/desktop_page.vala | 8 ++++++++ tests/dev.sinty.desktop.gschema.xml | 1 + 2 files changed, 9 insertions(+) diff --git a/src/components/sidebar/pages/desktop_page.vala b/src/components/sidebar/pages/desktop_page.vala index d9f2ccc..3801f4d 100644 --- a/src/components/sidebar/pages/desktop_page.vala +++ b/src/components/sidebar/pages/desktop_page.vala @@ -1206,6 +1206,14 @@ namespace Singularity { }); app_group.add_row(icons_row); + if (settings.settings_schema.has_key("animated-icons")) { + var animated_icons_row = new SwitchRow(_("Animated Icons"), _("Play short motions in app and desktop icons"), settings.get_boolean("animated-icons")); + animated_icons_row.switch_btn.notify["active"].connect(() => { + settings.set_boolean("animated-icons", animated_icons_row.switch_btn.active); + }); + app_group.add_row(animated_icons_row); + } + var panel_group = new PreferencesGroup(_("Top Panel")); var battery_pct_row = new SwitchRow(_("Show Battery Percentage"), _("Display the charge percentage next to the battery icon"), settings.get_boolean("show-battery-percentage")); battery_pct_row.switch_btn.notify["active"].connect(() => { diff --git a/tests/dev.sinty.desktop.gschema.xml b/tests/dev.sinty.desktop.gschema.xml index 0a5dfa5..4ce9143 100644 --- a/tests/dev.sinty.desktop.gschema.xml +++ b/tests/dev.sinty.desktop.gschema.xml @@ -18,6 +18,7 @@ 720 false true + true