Changing the length of the scan progress gauge

This commit is contained in:
mrkusypl committed 2026-04-22 01:54:49 +02:00
1 parent 9f649b5f5b
commit 0a955c1f15
1 file changed
+18 -2
+18 -2
View File
@@ -197,8 +197,24 @@ static bool ScanProgress_IsForward(void)
static void ScanProgress_DrawGaugeLine(uint8_t line, uint32_t current_index, uint32_t total, bool memory_mode)
{
const bool forward = ScanProgress_IsForward();
const uint8_t gauge_left = 40;
const uint8_t gauge_right = 122;
uint8_t gauge_left = 25;
if (total >= 100000) {
if (total >= 10000000) {
gauge_left = (total >= 100000000) ? 81 : 73;
} else {
gauge_left = (total >= 1000000) ? 65 : 57;
}
} else {
if (total >= 1000) {
gauge_left = (total >= 10000) ? 49 : 41;
} else {
gauge_left = (total >= 100) ? 33 : 25;
}
}
const uint8_t gauge_right = 126;
const uint8_t fill_start = gauge_left + 2;
const uint8_t fill_end = gauge_right - 2;
const uint8_t fill_cols = fill_end - fill_start + 1;