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 a2881611466cce5d461b6cd5099d7a481ba4c32a
Author: Alastair Poole <[email protected]>
AuthorDate: Sun Nov 29 19:11:05 2026 +0000

    gadgets: update animation
---
 data/themes/gadget-music.edc  | 18 +++---------------
 data/themes/gadget-sports.edc | 34 ++++++++++++++++++++++++++++++++++
 data/themes/shared.edc        | 11 +++++++++++
 modules/sports/sports.c       |  8 +++++++-
 4 files changed, 55 insertions(+), 16 deletions(-)

diff --git a/data/themes/gadget-music.edc b/data/themes/gadget-music.edc
index 4f681f7..2962509 100644
--- a/data/themes/gadget-music.edc
+++ b/data/themes/gadget-music.edc
@@ -31,17 +31,6 @@
       } \
    }
 
-#define MUSIC_SPINNER_DOT(PART, COLOR, SIZE, X, Y) \
-   part { name: PART; type: IMAGE; mouse_events: 0; scale: 1; clip_to: "spinner.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: MUSIC_FACE; \
-         map { on: 1; rotation.center: "spinner"; } \
-      } \
-      description { state: "rotate" 0.0; inherit: "default" 0.0; map.rotation.z: 360; } \
-   }
 group { name: "entrance/gadgets/music";
    parts {
       GADGET_SHADOW(MUSIC_FACE, MUSIC_RADIUS)
@@ -107,9 +96,9 @@ group { name: "entrance/gadgets/music";
          description { state: "default" 0.0; visible: 0; }
          description { state: "active" 0.0; inherit: "default" 0.0; visible: 1; }
       }
-      MUSIC_SPINNER_DOT("spinner-head", MUSIC_ACCENT, 10, 0.50, 0.13)
-      MUSIC_SPINNER_DOT("spinner-middle", MUSIC_MUTED, 7, 0.315, 0.18)
-      MUSIC_SPINNER_DOT("spinner-tail", MUSIC_EDGE, 5, 0.18, 0.315)
+      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)
       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)
@@ -155,7 +144,6 @@ group { name: "entrance/gadgets/music";
    }
 }
 
-#undef MUSIC_SPINNER_DOT
 #undef MUSIC_SWALLOW
 #undef MUSIC_TEXT
 #undef MUSIC_FACE
diff --git a/data/themes/gadget-sports.edc b/data/themes/gadget-sports.edc
index 9fbaf76..46c930a 100644
--- a/data/themes/gadget-sports.edc
+++ b/data/themes/gadget-sports.edc
@@ -72,6 +72,40 @@ group { name: "entrance/gadgets/sports";
             rel1.relative: 0.04 0.30; rel2.relative: 0.96 0.955;
          }
       }
+      part { name: "spinner"; type: RECT; mouse_events: 0; scale: 1;
+         description { state: "default" 0.0; visible: 0;
+            min: 46 46; max: 46 46; fixed: 1 1;
+            rel1.relative: 0.04 0.30; rel2.relative: 0.96 0.955;
+         }
+         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)
+   }
+   programs {
+      program { signal: "sports,loading"; source: "entrance"; filter: "spinner" "default";
+         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";
+      }
+      program { signal: "sports,idle"; source: "entrance"; filter: "spinner" "active";
+         action: ACTION_STOP; target: "rotate-spinner";
+         after: "hide-spinner";
+      }
+      program { name: "hide-spinner";
+         action: STATE_SET "default" 0.0;
+         target: "spinner";
+      }
    }
 }
 
diff --git a/data/themes/shared.edc b/data/themes/shared.edc
index dd7de28..ecb8372 100644
--- a/data/themes/shared.edc
+++ b/data/themes/shared.edc
@@ -93,6 +93,17 @@ 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; \
+         map { on: 1; rotation.center: "spinner"; } \
+      } \
+      description { state: "rotate" 0.0; inherit: "default" 0.0; map.rotation.z: 360; } \
+   }
 collections {
    group { name: "widgets/clock/shadow";
       parts {
diff --git a/modules/sports/sports.c b/modules/sports/sports.c
index d45787f..86b35bd 100644
--- a/modules/sports/sports.c
+++ b/modules/sports/sports.c
@@ -96,6 +96,8 @@ _status(Widgets_Sports *sports)
    else
       text = g_strdup(_("Fetching scores…"));
    edje_object_part_text_set(sports->card, "sports.status", text);
+   edje_object_signal_emit(sports->card, sports->request ? "sports,loading" : "sports,idle",
+                           "entrance");
 }
 
 static Eina_Bool
@@ -125,7 +127,8 @@ _render(Widgets_Sports *sports)
    _status(sports);
    if (!sports->matches)
      {
-        _message(sports, sports->failed ? _("Could not load fixtures.") : _("Loading fixtures…"));
+        if (sports->failed)
+           _message(sports, _("Could not load fixtures."));
         return;
      }
    if (!sports->matches->len)
@@ -314,6 +317,8 @@ _poll(void *data)
         sports->query_index = 0;
         if (!sports->url_ready || !_request_day(sports))
            _failed(sports);
+        else
+           _status(sports);
      }
    return ECORE_CALLBACK_RENEW;
 }
@@ -482,6 +487,7 @@ _stop(Widgets_Sports *sports)
    if (sports->url_ready)
       ecore_con_url_shutdown();
    sports->url_ready = sports->dragging = EINA_FALSE;
+   edje_object_signal_emit(sports->card, "sports,idle", "entrance");
    evas_object_hide(sports->card);
 }
 

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

Reply via email to