From 85b7e8124d8b81f1a1e754cf6e83cb5f61af4d7d Mon Sep 17 00:00:00 2001 From: pablohc Date: Mon, 26 Jan 2026 14:21:50 +0100 Subject: [PATCH] style: fix formatting issues --- lib/Epub/Epub.cpp | 4 +--- src/activities/home/HomeActivity.cpp | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/Epub/Epub.cpp b/lib/Epub/Epub.cpp index 8c0f5d63..43455d0f 100644 --- a/lib/Epub/Epub.cpp +++ b/lib/Epub/Epub.cpp @@ -421,7 +421,6 @@ bool Epub::generateCoverBmp(bool cropped) const { std::string Epub::getCoverHomeBmpPath() const { return cachePath + "/cover_home.bmp"; } - bool Epub::generateCoverHomeBmp() const { // Already generated, return true if (SdMan.exists(getCoverHomeBmpPath().c_str())) { @@ -485,8 +484,7 @@ bool Epub::generateCoverHomeBmp() const { const int targetWidth = (400 * jpegWidth) / jpegHeight; const bool success = - JpegToBmpConverter::jpegFileTo1BitBmpStreamWithSize(coverJpg, homeBmp, targetWidth, - HOME_TARGET_HEIGHT); + 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 ca13c329..1655978e 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;