From 7819cf0f77d3f4d944ca4f77ef7ff89b4df52267 Mon Sep 17 00:00:00 2001 From: cottongin Date: Tue, 17 Feb 2026 11:32:04 -0500 Subject: [PATCH] fix: correct book card highlight padding by increasing tile height Instead of shrinking the highlight strip (which clipped author text), increase homeCoverTileHeight from 310 to 318 for proper bottom padding. Revert double-padding subtraction in bottomH/bottomSectionHeight. Co-authored-by: Cursor --- lib/GfxRenderer/GfxRenderer.cpp | 2 +- src/components/themes/lyra/LyraTheme.cpp | 4 ++-- src/components/themes/lyra/LyraTheme.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/GfxRenderer/GfxRenderer.cpp b/lib/GfxRenderer/GfxRenderer.cpp index 33f70993..ade9883e 100644 --- a/lib/GfxRenderer/GfxRenderer.cpp +++ b/lib/GfxRenderer/GfxRenderer.cpp @@ -279,7 +279,7 @@ void GfxRenderer::drawPixelDither(const int x, const int y) co template <> void GfxRenderer::drawPixelDither(const int x, const int y) const { - drawPixel(x, y, (x + y) % 2 == 0); // TODO: maybe find a better pattern? + drawPixel(x, y, (x + y) % 2 == 0); } void GfxRenderer::fillRectDither(const int x, const int y, const int width, const int height, Color color) const { diff --git a/src/components/themes/lyra/LyraTheme.cpp b/src/components/themes/lyra/LyraTheme.cpp index 51471ef7..5ad7a41a 100644 --- a/src/components/themes/lyra/LyraTheme.cpp +++ b/src/components/themes/lyra/LyraTheme.cpp @@ -454,7 +454,7 @@ void LyraTheme::drawRecentBookCover(GfxRenderer& renderer, Rect rect, const std: cardWidth - hPaddingInSelection * 2 - coverSlotWidth, coverHeight, Color::LightGray); // Bottom strip (below cover, full width) const int bottomY = tileY + hPaddingInSelection + coverHeight; - const int bottomH = tileHeight - hPaddingInSelection * 2 - coverHeight; + const int bottomH = tileHeight - hPaddingInSelection - coverHeight; if (bottomH > 0) { renderer.fillRoundedRect(cardX, bottomY, cardWidth, bottomH, cornerRadius, false, false, true, true, Color::LightGray); @@ -481,7 +481,7 @@ void LyraTheme::drawRecentBookCover(GfxRenderer& renderer, Rect rect, const std: // ===== MULTI BOOK: TILE LAYOUT (2-3 books) ===== const int tileWidth = (rect.width - 2 * LyraMetrics::values.contentSidePadding) / bookCount; // Bottom section height: everything below cover + top padding - const int bottomSectionHeight = tileHeight - coverHeight - hPaddingInSelection * 2; + const int bottomSectionHeight = tileHeight - coverHeight - hPaddingInSelection; // Render covers (first render only) if (!coverRendered) { diff --git a/src/components/themes/lyra/LyraTheme.h b/src/components/themes/lyra/LyraTheme.h index 541ecbd9..a881c2f9 100644 --- a/src/components/themes/lyra/LyraTheme.h +++ b/src/components/themes/lyra/LyraTheme.h @@ -23,7 +23,7 @@ constexpr ThemeMetrics values = {.batteryWidth = 16, .scrollBarRightOffset = 5, .homeTopPadding = 56, .homeCoverHeight = 226, - .homeCoverTileHeight = 310, + .homeCoverTileHeight = 318, .homeRecentBooksCount = 3, .buttonHintsHeight = 40, .sideButtonHintsWidth = 30,