This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch main
in repository widgets.

View the commit online.

commit 5f8a3e2e232b9372d77a8dc5c176e55dd2e5d1a3
Author: Alastair Poole <[email protected]>
AuthorDate: Thu Dec 3 08:48:39 2026 +0000

    themes: spinner
---
 data/themes/gadget-music.edc    |  15 ++-------------
 data/themes/gadget-sports.edc   |  15 ++-------------
 data/themes/gadget-weather.edc  |  28 ++--------------------------
 data/themes/shared.edc          |  24 +++++++++++++++++-------
 data/themes/widgets-spinner.png | Bin 0 -> 4229 bytes
 5 files changed, 23 insertions(+), 59 deletions(-)

diff --git a/data/themes/gadget-music.edc b/data/themes/gadget-music.edc
index e160553..924f68d 100644
--- a/data/themes/gadget-music.edc
+++ b/data/themes/gadget-music.edc
@@ -96,9 +96,7 @@ group { name: "entrance/gadgets/music";
          description { state: "default" 0.0; visible: 0; }
          description { state: "active" 0.0; inherit: "default" 0.0; visible: 1; }
       }
-      GADGET_SPINNER_DOT("spinner-head", MUSIC_FACE, "spinner.clip", MUSIC_ACCENT, 10, 0.50, 0.13)
-      GADGET_SPINNER_DOT("spinner-middle", MUSIC_FACE, "spinner.clip", MUSIC_MUTED, 7, 0.315, 0.18)
-      GADGET_SPINNER_DOT("spinner-tail", MUSIC_FACE, "spinner.clip", MUSIC_EDGE, 5, 0.18, 0.315)
+      GADGET_SPINNER("spinner.clip", MUSIC_ACCENT)
       MUSIC_SWALLOW("music.choose", 0.05, 0.56, 0.70, 0.75)
       MUSIC_SWALLOW("music.play", 0.73, 0.56, 0.94, 0.75)
       MUSIC_SWALLOW("music.volume", 0.05, 0.79, 0.94, 0.95)
@@ -119,16 +117,7 @@ group { name: "entrance/gadgets/music";
          action: STATE_SET "active" 0.0; target: "spinner.clip";
          after: "reset-spinner";
       }
-      program { name: "reset-spinner";
-         action: STATE_SET "default" 0.0;
-         target: "spinner-head"; target: "spinner-middle"; target: "spinner-tail";
-         after: "rotate-spinner";
-      }
-      program { name: "rotate-spinner";
-         action: STATE_SET "rotate" 0.0; transition: LINEAR 1.15;
-         target: "spinner-head"; target: "spinner-middle"; target: "spinner-tail";
-         after: "reset-spinner";
-      }
+      GADGET_SPINNER_PROGRAMS
       program { signal: "radio,loaded"; source: "entrance"; filter: "spinner.clip" "active";
          action: ACTION_STOP; target: "rotate-spinner";
          after: "hide-spinner";
diff --git a/data/themes/gadget-sports.edc b/data/themes/gadget-sports.edc
index ca25cd6..41df11d 100644
--- a/data/themes/gadget-sports.edc
+++ b/data/themes/gadget-sports.edc
@@ -111,9 +111,7 @@ group { name: "entrance/gadgets/sports";
          }
          description { state: "active" 0.0; inherit: "default" 0.0; visible: 1; }
       }
-      GADGET_SPINNER_DOT("spinner-head", SCORE_FACE, "spinner", SCORE_ACCENT, 10, 0.50, 0.13)
-      GADGET_SPINNER_DOT("spinner-middle", SCORE_FACE, "spinner", SCORE_MUTED, 7, 0.315, 0.18)
-      GADGET_SPINNER_DOT("spinner-tail", SCORE_FACE, "spinner", SCORE_EDGE, 5, 0.18, 0.315)
+      GADGET_SPINNER("spinner", SCORE_ACCENT)
       GADGET_RESIZE_HANDLE
    }
    programs {
@@ -121,16 +119,7 @@ group { name: "entrance/gadgets/sports";
          action: STATE_SET "active" 0.0; target: "spinner";
          after: "reset-spinner";
       }
-      program { name: "reset-spinner";
-         action: STATE_SET "default" 0.0;
-         target: "spinner-head"; target: "spinner-middle"; target: "spinner-tail";
-         after: "rotate-spinner";
-      }
-      program { name: "rotate-spinner";
-         action: STATE_SET "rotate" 0.0; transition: LINEAR 1.15;
-         target: "spinner-head"; target: "spinner-middle"; target: "spinner-tail";
-         after: "reset-spinner";
-      }
+      GADGET_SPINNER_PROGRAMS
       program { signal: "sports,idle"; source: "entrance"; filter: "spinner" "active";
          action: ACTION_STOP; target: "rotate-spinner";
          after: "hide-spinner";
diff --git a/data/themes/gadget-weather.edc b/data/themes/gadget-weather.edc
index 6b4d757..a93ecb6 100644
--- a/data/themes/gadget-weather.edc
+++ b/data/themes/gadget-weather.edc
@@ -45,18 +45,6 @@ images.image: WEATHER_FACE COMP;
    WEATHER_ICON(ICON, X1, 0.77, X2, 0.90) \
    WEATHER_TEXT(RANGE, WEATHER_INK, WEATHER_FONT, X1, 0.90, X2, 0.975, 0.5)
 
-#define WEATHER_SPINNER_DOT(PART, COLOR, SIZE, X, Y) \
-   part { name: PART; type: IMAGE; mouse_events: 0; scale: 1; clip_to: "spinner"; \
-      description { state: "default" 0.0; color: COLOR; min: SIZE SIZE; max: SIZE SIZE; \
-         fixed: 1 1; \
-         rel1 { to: "spinner"; relative: X Y; } \
-         rel2 { to: "spinner"; relative: X Y; offset: 0 0; } \
-         image.normal: WEATHER_FACE; \
-         map { on: 1; rotation.center: "spinner"; } \
-      } \
-      description { state: "rotate" 0.0; inherit: "default" 0.0; map.rotation.z: 360; } \
-   }
-
 group { name: "entrance/gadgets/weather";
    parts {
       GADGET_SHADOW(WEATHER_FACE, WEATHER_RADIUS)
@@ -98,9 +86,7 @@ group { name: "entrance/gadgets/weather";
          }
          description { state: "active" 0.0; inherit: "default" 0.0; visible: 1; }
       }
-      WEATHER_SPINNER_DOT("spinner-head", WEATHER_ACCENT, 10, 0.50, 0.13)
-      WEATHER_SPINNER_DOT("spinner-middle", WEATHER_MUTED, 7, 0.315, 0.18)
-      WEATHER_SPINNER_DOT("spinner-tail", WEATHER_EDGE, 5, 0.18, 0.315)
+      GADGET_SPINNER("spinner", WEATHER_ACCENT)
       part { name: "handle"; type: RECT;
          description { state: "default" 0.0; color: 0 0 0 0;
             rel2.relative: 0.99 0.13;
@@ -116,16 +102,7 @@ group { name: "entrance/gadgets/weather";
       program { name: "hide-rules";
          action: STATE_SET "loading" 0.0; target: "details-rule"; target: "forecast-rule";
       }
-      program { name: "reset-spinner";
-         action: STATE_SET "default" 0.0;
-         target: "spinner-head"; target: "spinner-middle"; target: "spinner-tail";
-         after: "rotate-spinner";
-      }
-      program { name: "rotate-spinner";
-         action: STATE_SET "rotate" 0.0; transition: LINEAR 1.15;
-         target: "spinner-head"; target: "spinner-middle"; target: "spinner-tail";
-         after: "reset-spinner";
-      }
+      GADGET_SPINNER_PROGRAMS
       program { signal: "weather,idle"; source: "entrance"; filter: "spinner" "active";
          action: ACTION_STOP; target: "rotate-spinner";
          after: "hide-spinner";
@@ -136,7 +113,6 @@ group { name: "entrance/gadgets/weather";
       }
    }
 }
-#undef WEATHER_SPINNER_DOT
 #undef WEATHER_ACCENT
 #undef WEATHER_TEXT
 #undef WEATHER_RULE
diff --git a/data/themes/shared.edc b/data/themes/shared.edc
index e035649..43534c5 100644
--- a/data/themes/shared.edc
+++ b/data/themes/shared.edc
@@ -71,6 +71,7 @@ images.image: "ring-6.png" COMP;
 
 images {
    image: "widgets-menu-row.svg" COMP;
+   image: "widgets-spinner.png" COMP;
    image: "widgets-card-shadow.png" COMP;
    image: "widgets-clock-shadow.png" COMP;
 }
@@ -93,17 +94,26 @@ images {
       } \
    }
 
-#define GADGET_SPINNER_DOT(PART, FACE, CLIP, COLOR, SIZE, X, Y) \
-   part { name: PART; type: IMAGE; mouse_events: 0; scale: 1; clip_to: CLIP; \
-      description { state: "default" 0.0; color: COLOR; min: SIZE SIZE; max: SIZE SIZE; \
-         fixed: 1 1; \
-         rel1 { to: "spinner"; relative: X Y; } \
-         rel2 { to: "spinner"; relative: X Y; offset: 0 0; } \
-         image.normal: FACE; \
+#define GADGET_SPINNER(CLIP, COLOR) \
+   part { name: "spinner-ring"; type: IMAGE; mouse_events: 0; clip_to: CLIP; \
+      description { state: "default" 0.0; color: COLOR; \
+         rel.to: "spinner"; \
+         image.normal: "widgets-spinner.png"; \
          map { on: 1; rotation.center: "spinner"; } \
       } \
       description { state: "rotate" 0.0; inherit: "default" 0.0; map.rotation.z: 360; } \
    }
+
+#define GADGET_SPINNER_PROGRAMS \
+   program { name: "reset-spinner"; \
+      action: STATE_SET "default" 0.0; target: "spinner-ring"; \
+      after: "rotate-spinner"; \
+   } \
+   program { name: "rotate-spinner"; \
+      action: STATE_SET "rotate" 0.0; transition: LINEAR 1.0; target: "spinner-ring"; \
+      after: "reset-spinner"; \
+   }
+
 /* The Daylight title spans 11% of the 292-unit reference card. */
 #define GADGET_TITLE(NAME, FONT, COLOR, X1, Y1, X2, Y2, ALIGN) \
    part { name: NAME; type: TEXT; mouse_events: 0; scale: 1; \
diff --git a/data/themes/widgets-spinner.png b/data/themes/widgets-spinner.png
new file mode 100644
index 0000000..658caac
Binary files /dev/null and b/data/themes/widgets-spinner.png differ

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to