From d7f89e6c0dd7271c7a7825c6e579aed786bca4ff Mon Sep 17 00:00:00 2001 From: Lev Roland-Kalb <114942703+Levrk@users.noreply.github.com> Date: Thu, 19 Feb 2026 19:56:19 -0500 Subject: [PATCH] fix: re-implementing Cover Outlines for the new Lyra Themes (#1017) ## Summary * **What is the goal of this PR?** (e.g., Implements the new feature for file uploading.) Improve legibility of Cover Icons on the home page and elsewhere. Fixes #898 Re implements the changes made in #907 that were overwritten by the new lyra themes * **What changes are included?** Cover outline is now shown even when cover is found to prevent issues with low contrast covers blending into the background. Photo is attached below: Untitled (4) ## Additional Context * Add any other information that might be helpful for the reviewer (e.g., performance implications, potential risks, specific areas to focus on). Re implements the changes made in #907 that were overwritten by the new lyra themes --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**Yes**_ --- src/components/themes/lyra/Lyra3CoversTheme.cpp | 5 +++-- src/components/themes/lyra/LyraTheme.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/themes/lyra/Lyra3CoversTheme.cpp b/src/components/themes/lyra/Lyra3CoversTheme.cpp index 54c745b6..55d5dda5 100644 --- a/src/components/themes/lyra/Lyra3CoversTheme.cpp +++ b/src/components/themes/lyra/Lyra3CoversTheme.cpp @@ -64,11 +64,12 @@ void Lyra3CoversTheme::drawRecentBookCover(GfxRenderer& renderer, Rect rect, con file.close(); } } + // Draw either way + renderer.drawRect(tileX + hPaddingInSelection, tileY + hPaddingInSelection, tileWidth - 2 * hPaddingInSelection, + Lyra3CoversMetrics::values.homeCoverHeight, true); if (!hasCover) { // Render empty cover - renderer.drawRect(tileX + hPaddingInSelection, tileY + hPaddingInSelection, - tileWidth - 2 * hPaddingInSelection, Lyra3CoversMetrics::values.homeCoverHeight, true); renderer.fillRect(tileX + hPaddingInSelection, tileY + hPaddingInSelection + (Lyra3CoversMetrics::values.homeCoverHeight / 3), tileWidth - 2 * hPaddingInSelection, 2 * Lyra3CoversMetrics::values.homeCoverHeight / 3, diff --git a/src/components/themes/lyra/LyraTheme.cpp b/src/components/themes/lyra/LyraTheme.cpp index d9950fa0..a291b7c4 100644 --- a/src/components/themes/lyra/LyraTheme.cpp +++ b/src/components/themes/lyra/LyraTheme.cpp @@ -448,10 +448,12 @@ void LyraTheme::drawRecentBookCover(GfxRenderer& renderer, Rect rect, const std: } } + // Draw either way + renderer.drawRect(tileX + hPaddingInSelection, tileY + hPaddingInSelection, coverWidth, + LyraMetrics::values.homeCoverHeight, true); + if (!hasCover) { // Render empty cover - renderer.drawRect(tileX + hPaddingInSelection, tileY + hPaddingInSelection, coverWidth, - LyraMetrics::values.homeCoverHeight, true); renderer.fillRect(tileX + hPaddingInSelection, tileY + hPaddingInSelection + (LyraMetrics::values.homeCoverHeight / 3), coverWidth, 2 * LyraMetrics::values.homeCoverHeight / 3, true);