Skip to content

fw/applib/ui/dialogs: fix dialog icon animation offset for wider displays#865

Closed
cyrusagent[bot] wants to merge 1 commit intomainfrom
cyrus/firm-1068-shredder-animation-is-misaligned-on-pt2
Closed

fw/applib/ui/dialogs: fix dialog icon animation offset for wider displays#865
cyrusagent[bot] wants to merge 1 commit intomainfrom
cyrus/firm-1068-shredder-animation-is-misaligned-on-pt2

Conversation

@cyrusagent
Copy link

@cyrusagent cyrusagent bot commented Feb 19, 2026

Summary

Fix the shredder (and other dialog icon) animation being misaligned on Pebble Time 2 (obelix) and other wider displays.

The hardcoded DISP_OFFSET = 80 in dialog_init_icon_layer() was insufficient for displays wider than 144px. On obelix (200px wide), the icon slide-in animation started at x=80, which is well within the visible area instead of off-screen.

Changes

  • Replace hardcoded DISP_OFFSET = 80 with display-aware values:
    • From right: use DISP_COLS (display width) so the icon starts just off the right edge
    • From left: use -icon_rect.size.w so the icon starts just off the left edge
  • This ensures correct off-screen animation start positions on all display sizes (144px, 180px, 200px, 260px)

Testing

  • Compilation verified clean for obelix_dvt, snowy_bb2, and getafix_dvt
  • Unit tests pass for snowy (8/8) and spalding (8/8)
  • Logical analysis confirms correct offset values across all 6 platforms

Linear Issue

Fixes FIRM-1068

@cyrusagent cyrusagent bot changed the title WIP: Fix shredder animation misalignment on PT2 fw/applib/ui/dialogs: fix dialog icon animation offset for wider displays Feb 19, 2026
@cyrusagent cyrusagent bot marked this pull request as ready for review February 19, 2026 20:12
@cyrusagent cyrusagent bot force-pushed the cyrus/firm-1068-shredder-animation-is-misaligned-on-pt2 branch 2 times, most recently from d7ebd2e to 20572dc Compare February 20, 2026 09:13
…lays

The hardcoded DISP_OFFSET of 80 was insufficient for displays wider than
144px (e.g. obelix/robert at 200px), causing the icon slide-in animation
to start on-screen instead of off-screen. Use DISP_COLS for the from-right
offset and -icon_rect.size.w for the from-left offset to ensure the icon
always starts fully off-screen on all display sizes.

Fixes FIRM-1068

Signed-Off-By: Gerard Marull-Paretas <gerard@teslabs.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cyrusagent cyrusagent bot force-pushed the cyrus/firm-1068-shredder-animation-is-misaligned-on-pt2 branch from 20572dc to 7db3139 Compare February 20, 2026 10:35
@gmarull
Copy link
Member

gmarull commented Feb 20, 2026

#868

@gmarull gmarull closed this Feb 20, 2026
@gmarull gmarull deleted the cyrus/firm-1068-shredder-animation-is-misaligned-on-pt2 branch February 20, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant