From 6d6559022cf1fff6cdc22b5a06f2caef36ceef97 Mon Sep 17 00:00:00 2001 From: pablohc Date: Mon, 26 Jan 2026 13:47:32 +0100 Subject: [PATCH] style: fix formatting issues in cover generation code --- lib/Epub/Epub.cpp | 4 +++- src/activities/home/HomeActivity.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Epub/Epub.cpp b/lib/Epub/Epub.cpp index 920a7092..8c0f5d63 100644 --- a/lib/Epub/Epub.cpp +++ b/lib/Epub/Epub.cpp @@ -484,7 +484,9 @@ bool Epub::generateCoverHomeBmp() const { // Calculate proportional width for 400px height const int targetWidth = (400 * jpegWidth) / jpegHeight; - const bool success = JpegToBmpConverter::jpegFileTo1BitBmpStreamWithSize(coverJpg, homeBmp, targetWidth, HOME_TARGET_HEIGHT); + const bool success = + JpegToBmpConverter::jpegFileTo1BitBmpStreamWithSize(coverJpg, homeBmp, targetWidth, + HOME_TARGET_HEIGHT); coverJpg.close(); homeBmp.close(); SdMan.remove(coverJpgTempPath.c_str()); diff --git a/src/activities/home/HomeActivity.cpp b/src/activities/home/HomeActivity.cpp index 9b053343..ca13c329 100644 --- a/src/activities/home/HomeActivity.cpp +++ b/src/activities/home/HomeActivity.cpp @@ -239,8 +239,8 @@ void HomeActivity::render() { // Use 400px height as specified, with proportional width constexpr int CARD_HEIGHT = 400; const int cardWidth = (coverWidth > 0 && coverHeight > 0) - ? (CARD_HEIGHT * coverWidth) / coverHeight - : 240; // Fallback to 240px width if no image (maintain aspect ratio) + ? (CARD_HEIGHT * coverWidth) / coverHeight + : 240; // Fallback to 240px width if no image (maintain aspect ratio) const int bookX = (pageWidth - cardWidth) / 2; constexpr int bookY = 30;