fix: add default switch case, remove duplicate fillRect, suppress unused textWidth, rename bottomSelectedRow

This commit is contained in:
pablohc
2026-04-12 23:08:50 +02:00
committed by jpirnay
parent 74a3fbd5db
commit bc0205df79
2 changed files with 5 additions and 6 deletions
+1 -4
View File
@@ -862,6 +862,7 @@ void BaseTheme::drawHelpText(const GfxRenderer& renderer, Rect rect, const char*
}
void BaseTheme::drawTextField(const GfxRenderer& renderer, Rect rect, const int textWidth) const {
(void)textWidth;
const int lineHeight = renderer.getLineHeight(UI_12_FONT_ID);
const int bracketHeight = lineHeight;
const int fieldLeft = rect.x + 10;
@@ -914,10 +915,6 @@ void BaseTheme::drawKeyboardKey(const GfxRenderer& renderer, Rect rect, const ch
const int itemWidth = renderer.getTextWidth(UI_12_FONT_ID, label);
const int textX = rect.x + (rect.width - itemWidth) / 2;
const int textY = rect.y + (rect.height - renderer.getLineHeight(UI_12_FONT_ID)) / 2 + primaryOffset;
if (isSelected) {
renderer.fillRect(rect.x, rect.y, rect.width, rect.height, true);
}
renderer.drawText(UI_12_FONT_ID, textX, textY, label, !isSelected);
if (hasSecondary) {