fix(engine): resize pile-marker outline and watermark children on relayout #131

Merged
funman300 merged 1 commits from fix/pile-marker-child-resize into master 2026-07-06 21:28:23 +00:00
Owner

Found during Fold 7 on-device verification of v0.41.0 (photo evidence): after a fold/unfold, the empty foundation slots rendered as oversized grey slabs.

Root cause: on_window_resized resized the pile-marker fill sprite but never its two children — the outline frame and the "A"/"K" watermark — which are sized once at spawn. Any resize left them at spawn-time size.

Fix: the resize handler re-derives both children from the new layout using the same formulas as spawn (outline = card_size + 2×PILE_MARKER_OUTLINE_WIDTH, watermark font = card_size.x × 0.28).

Also adds:

  • regression test resize_updates_marker_outline_and_watermark_children
  • an Android-gated relayout log line (width/height/insets) as the evidence channel for #130

Gates: desktop clippy --all-targets -D warnings clean, cargo ndk clippy for aarch64 clean, workspace tests green.

Refs #130

🤖 Generated with Claude Code

Found during Fold 7 on-device verification of v0.41.0 (photo evidence): after a fold/unfold, the empty foundation slots rendered as oversized grey slabs. **Root cause:** `on_window_resized` resized the pile-marker fill sprite but never its two children — the outline frame and the "A"/"K" watermark — which are sized once at spawn. Any resize left them at spawn-time size. **Fix:** the resize handler re-derives both children from the new layout using the same formulas as spawn (outline = card_size + 2×`PILE_MARKER_OUTLINE_WIDTH`, watermark font = card_size.x × 0.28). Also adds: - regression test `resize_updates_marker_outline_and_watermark_children` - an Android-gated relayout log line (width/height/insets) as the evidence channel for #130 Gates: desktop clippy `--all-targets -D warnings` clean, `cargo ndk` clippy for aarch64 clean, workspace tests green. Refs #130 🤖 Generated with [Claude Code](https://claude.com/claude-code)
funman300 added 1 commit 2026-07-06 21:28:22 +00:00
Found during Fold 7 on-device verification of v0.41.0: on_window_resized
resized the marker fill sprite but never its children, so after any
resize (fold/unfold, rotation) the outline frame and the A/K watermark
kept their spawn-time size — rendering as oversized grey slabs over the
empty foundation slots.

The resize handler now re-derives both children from the new layout
(outline = card_size + 2*PILE_MARKER_OUTLINE_WIDTH, watermark font =
card_size.x * 0.28 — same formulas as spawn). Adds a regression test
and an Android-gated relayout log line (width/height/insets) as the
evidence channel for the remaining foldable layout bug (#130).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
funman300 merged commit dbe2addc30 into master 2026-07-06 21:28:23 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#131