From c50572955851b69f7cff6010d5f6962c6d7e033c Mon Sep 17 00:00:00 2001 From: Eliz Kilic Date: Fri, 23 Jan 2026 12:15:15 +0000 Subject: [PATCH] update lines --- src/activities/home/MyLibraryActivity.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/activities/home/MyLibraryActivity.cpp b/src/activities/home/MyLibraryActivity.cpp index a6d60195..1d7df1de 100644 --- a/src/activities/home/MyLibraryActivity.cpp +++ b/src/activities/home/MyLibraryActivity.cpp @@ -15,7 +15,8 @@ namespace { // Layout constants constexpr int TAB_BAR_Y = 15; constexpr int CONTENT_START_Y = 60; -constexpr int LINE_HEIGHT = 65; // Increased for two-line items +constexpr int LINE_HEIGHT = 30; +constexpr int RECENTS_LINE_HEIGHT = 65; // Increased for two-line items constexpr int LEFT_MARGIN = 20; constexpr int RIGHT_MARGIN = 40; // Extra space for scroll indicator @@ -322,13 +323,13 @@ void MyLibraryActivity::renderRecentTab() const { const auto pageStartIndex = selectorIndex / pageItems * pageItems; // Draw selection highlight - renderer.fillRect(0, CONTENT_START_Y + (selectorIndex % pageItems) * LINE_HEIGHT - 2, pageWidth - RIGHT_MARGIN, - LINE_HEIGHT); + renderer.fillRect(0, CONTENT_START_Y + (selectorIndex % pageItems) * RECENTS_LINE_HEIGHT - 2, pageWidth - RIGHT_MARGIN, + RECENTS_LINE_HEIGHT); // Draw items for (int i = pageStartIndex; i < bookCount && i < pageStartIndex + pageItems; i++) { const auto& book = recentBooks[i]; - const int y = CONTENT_START_Y + (i % pageItems) * LINE_HEIGHT; + const int y = CONTENT_START_Y + (i % pageItems) * RECENTS_LINE_HEIGHT; // Line 1: Title std::string title = book.title; @@ -345,7 +346,7 @@ void MyLibraryActivity::renderRecentTab() const { } } auto truncatedTitle = renderer.truncatedText(UI_12_FONT_ID, title.c_str(), pageWidth - LEFT_MARGIN - RIGHT_MARGIN); - renderer.drawText(UI_12_FONT_ID, LEFT_MARGIN, y + 5, truncatedTitle.c_str(), i != selectorIndex); + renderer.drawText(UI_12_FONT_ID, LEFT_MARGIN, y + 3, truncatedTitle.c_str(), i != selectorIndex); // Line 2: Author if (!book.author.empty()) {