Minor changes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user