Draw header after content with a white fill over the header zone, so scrolled cover images and text slide behind the header instead of rendering on top of it. Removed incorrect maxHeight clamping that caused the cover to shrink rather than scroll. Made-with: Cursor
1.4 KiB
1.4 KiB
BookInfo Header Overlap Fix
Date: 2026-03-09 Task: Fix BookInfo header not properly overlaying scrolled content (cover image and text fields bleeding into the header bar area).
Problem
The BookInfo screen's header (clock, battery, "Book Info" title) was being drawn before content, so the book cover thumbnail and text fields could render on top of or overlap with the header when scrolling. Additionally, the initial attempt to clip the cover by reducing maxHeight in drawBitmap1Bit caused the cover to shrink rather than scroll behind the header, because maxHeight controls bitmap scaling, not clipping.
Changes Made
src/activities/home/BookInfoActivity.cpp
- Moved header rendering after content:
GUI.drawHeader()is now called after all content (cover + fields) is drawn, not before. Arenderer.fillRect(0, 0, pageW, contentTop, false)wipe of the header zone precedes the header draw, ensuring any content that scrolled into the header region is cleared before the header paints on top. - Removed incorrect cover clipping: The cover bitmap is now drawn at its natural scrolled
yposition with fullcoverDisplayWidthandcoverDisplayHeight(no clamping ofmaxHeight). The header fill+draw handles visual clipping. This gives the correct "scroll behind the header" behavior instead of the cover appearing to shrink.
Follow-up
None -- visual behavior confirmed acceptable by user.