From 75277dbee5f967d2d1839e51033272f3aa842c8a Mon Sep 17 00:00:00 2001 From: jpirnay Date: Wed, 8 Apr 2026 10:20:05 +0200 Subject: [PATCH] Minor changes --- src/activities/boot_sleep/SleepActivity.cpp | 6 ++---- src/activities/util/BmpViewerActivity.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/activities/boot_sleep/SleepActivity.cpp b/src/activities/boot_sleep/SleepActivity.cpp index 37f7ecc2..38ebc3d2 100644 --- a/src/activities/boot_sleep/SleepActivity.cpp +++ b/src/activities/boot_sleep/SleepActivity.cpp @@ -674,14 +674,12 @@ void SleepActivity::renderBitmapSleepScreen(const Bitmap& bitmap, const BookOver std::string progressStr; if (!overlayInfo.chapterName.empty()) { - const std::string prefix = ""; - const int prefixWidth = renderer.getTextWidth(UI_10_FONT_ID, prefix.c_str()); const int suffixWidth = renderer.getTextWidth(UI_10_FONT_ID, overlayInfo.progressSuffix.c_str()); - const int maxChapterWidth = availableWidth - prefixWidth - suffixWidth; + const int maxChapterWidth = availableWidth - suffixWidth; const std::string truncatedChapter = maxChapterWidth > 0 ? renderer.truncatedText(UI_10_FONT_ID, overlayInfo.chapterName.c_str(), maxChapterWidth) : ""; - progressStr = prefix + truncatedChapter + overlayInfo.progressSuffix; + progressStr = truncatedChapter + overlayInfo.progressSuffix; } else { progressStr = renderer.truncatedText(UI_10_FONT_ID, overlayInfo.progressText.c_str(), availableWidth); } diff --git a/src/activities/util/BmpViewerActivity.cpp b/src/activities/util/BmpViewerActivity.cpp index a5c478ea..cf47a96d 100644 --- a/src/activities/util/BmpViewerActivity.cpp +++ b/src/activities/util/BmpViewerActivity.cpp @@ -233,7 +233,7 @@ bool BmpViewerActivity::renderDecodedImage(const bool showControls) { if (!showControls) return; const char* modeLabel = grayscaleDisplay ? tr(STR_IMAGE_DISPLAY_BW) : tr(STR_IMAGE_DISPLAY_GRAYSCALE); #ifdef ENABLE_IMAGE_DITHERING_EXTENSION - const char* btn3Label = grayscaleDisplay ? I18N.get(getCurrentDitherModeLabel()) : modeLabel; + const char* btn3Label = grayscaleDisplay ? I18N.get(getCurrentDitherModeLabel()) : ""; const auto labels = mappedInput.mapLabels(tr(STR_BACK), modeLabel, btn3Label, tr(STR_SET_SLEEP_SCREEN)); #else const auto labels = mappedInput.mapLabels(tr(STR_BACK), modeLabel, "", tr(STR_SET_SLEEP_SCREEN));