feat(contacts): animated avatars (GIF/WebP) with a Settings toggle
Animate contact avatars end to end:
- texture_loader gains LoadAnimatedRGBA: decodes an image into a downscaled
RGBA frame sequence + per-frame durations — animated GIF via stb
(stbi_load_gif_from_memory) and animated WebP via libwebp's WebPAnimDecoder;
stills (and APNG, which stb reads as one image) return a single frame. Frames
are box-downscaled (smaller cap for animations) to bound VRAM, capped at 300.
- The contacts avatar cache now holds a frame sequence; currentAvatarFrame()
advances animated avatars by the ImGui clock and is used everywhere avatars
draw (list, cards, table, grid, preview). When a live animated frame is drawn
it flags the render loop (ConsumeContactsAvatarAnimation, clear-on-read) so
main.cpp keeps producing frames while animation plays and idles when it stops
or the contacts view is hidden.
- New animate_avatars setting (default on) + a Settings appearance toggle
("Animate avatars"); off shows the first frame only. currentAvatarFrame
honors it. +i18n (8 langs, CJK subset rebuilt for 帧/播/첫).
Verified: a 3-frame GIF and a 3-frame animated WebP both decode to 3 frames
with correct 120ms delays through the exact libwebp/stb calls used here.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
"amount_details": "DÉTAILS DU MONTANT",
|
||||
"amount_exceeds_balance": "Le montant dépasse le solde",
|
||||
"amount_label": "Montant :",
|
||||
"animate_avatars": "Animer les avatars",
|
||||
"appearance": "APPARENCE",
|
||||
"auto_shield": "Auto-blindage du minage",
|
||||
"av_intro": "Les logiciels de minage sont souvent signalés comme potentiellement indésirables. Suivez ces étapes pour activer le minage en pool :",
|
||||
@@ -1329,6 +1330,7 @@
|
||||
"try_again": "Réessayer",
|
||||
"tt_addr_url": "URL de base pour consulter les adresses dans un explorateur de blocs",
|
||||
"tt_address_book": "Gérer les adresses enregistrées pour un envoi rapide",
|
||||
"tt_animate_avatars": "Lit les avatars de contact animés (GIF / WebP) ; désactivé n'affiche que la première image",
|
||||
"tt_auto_lock": "Verrouiller le portefeuille après cette durée d'inactivité",
|
||||
"tt_auto_shield": "Déplacer automatiquement le solde transparent vers des adresses blindées pour la confidentialité",
|
||||
"tt_backup": "Créer une sauvegarde de votre wallet.dat",
|
||||
|
||||
Reference in New Issue
Block a user