Add extra bar indicator for near-complete progress

Draws a small additional bar segment when progress reaches 95% or higher, positioned at x+14 within the progress bar cavity. The extra bar is capped at 3 pixels wide to fit within the available space.
This commit is contained in:
Justin Mitchell
2026-06-20 00:14:48 -04:00
parent a242397fa0
commit beb4e82c9c
3 changed files with 16 additions and 9 deletions
+5
View File
@@ -101,6 +101,11 @@ void LyraTheme::fillBatteryIcon(const GfxRenderer& renderer, Rect rect, uint16_t
if (percentage > 70) {
renderer.fillRect(rect.x + 10, rect.y + 2, 3, rect.height - 4);
}
const int extraBarX = rect.x + 14;
const int cavityRight = rect.x + 2 + (rect.width - 5);
if (percentage >= 95 && extraBarX < cavityRight) {
renderer.fillRect(extraBarX, rect.y + 2, std::min(3, cavityRight - extraBarX), rect.height - 4);
}
}
}