fix: remove decimal places from progress % (#507)
## Summary Addresses https://github.com/crosspoint-reader/crosspoint-reader/issues/504 - Reverts book progress % to showing as an integer instead of with a decimal place - This was changed to 1 decimal point of precision in https://github.com/crosspoint-reader/crosspoint-reader/pull/232 from what I can tell - As this wasn't the primary intention of that PR, I'm assuming it was left in accidentally IMO having a decimal place of precision is too much for something as vague as book completion percent. This de-clutters the status bar and prevents extra updates as you change pages. --- ### AI Usage YES
This commit is contained in:
parent
e858ebbe88
commit
b8ebcf5867
@ -448,7 +448,7 @@ void EpubReaderActivity::renderStatusBar(const int orientedMarginRight, const in
|
||||
|
||||
// Right aligned text for progress counter
|
||||
char progressStr[32];
|
||||
snprintf(progressStr, sizeof(progressStr), "%d/%d %.1f%%", section->currentPage + 1, section->pageCount,
|
||||
snprintf(progressStr, sizeof(progressStr), "%d/%d %.0f%%", section->currentPage + 1, section->pageCount,
|
||||
bookProgress);
|
||||
const std::string progress = progressStr;
|
||||
progressTextWidth = renderer.getTextWidth(SMALL_FONT_ID, progress.c_str());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user