fix: add bottom padding to home screen book card highlight
The selection highlight had uniform padding on the top, left, and right but none on the bottom, causing descenders in the author text to clip past the highlight edge. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -454,7 +454,7 @@ void LyraTheme::drawRecentBookCover(GfxRenderer& renderer, Rect rect, const std:
|
|||||||
cardWidth - hPaddingInSelection * 2 - coverSlotWidth, coverHeight, Color::LightGray);
|
cardWidth - hPaddingInSelection * 2 - coverSlotWidth, coverHeight, Color::LightGray);
|
||||||
// Bottom strip (below cover, full width)
|
// Bottom strip (below cover, full width)
|
||||||
const int bottomY = tileY + hPaddingInSelection + coverHeight;
|
const int bottomY = tileY + hPaddingInSelection + coverHeight;
|
||||||
const int bottomH = tileHeight - hPaddingInSelection - coverHeight;
|
const int bottomH = tileHeight - hPaddingInSelection * 2 - coverHeight;
|
||||||
if (bottomH > 0) {
|
if (bottomH > 0) {
|
||||||
renderer.fillRoundedRect(cardX, bottomY, cardWidth, bottomH, cornerRadius, false, false, true, true,
|
renderer.fillRoundedRect(cardX, bottomY, cardWidth, bottomH, cornerRadius, false, false, true, true,
|
||||||
Color::LightGray);
|
Color::LightGray);
|
||||||
@@ -481,7 +481,7 @@ void LyraTheme::drawRecentBookCover(GfxRenderer& renderer, Rect rect, const std:
|
|||||||
// ===== MULTI BOOK: TILE LAYOUT (2-3 books) =====
|
// ===== MULTI BOOK: TILE LAYOUT (2-3 books) =====
|
||||||
const int tileWidth = (rect.width - 2 * LyraMetrics::values.contentSidePadding) / bookCount;
|
const int tileWidth = (rect.width - 2 * LyraMetrics::values.contentSidePadding) / bookCount;
|
||||||
// Bottom section height: everything below cover + top padding
|
// Bottom section height: everything below cover + top padding
|
||||||
const int bottomSectionHeight = tileHeight - coverHeight - hPaddingInSelection;
|
const int bottomSectionHeight = tileHeight - coverHeight - hPaddingInSelection * 2;
|
||||||
|
|
||||||
// Render covers (first render only)
|
// Render covers (first render only)
|
||||||
if (!coverRendered) {
|
if (!coverRendered) {
|
||||||
|
|||||||
Reference in New Issue
Block a user