fix: resolve 6 cppcheck low-style warnings in keyboard code

This commit is contained in:
pablohc
2026-04-12 23:08:50 +02:00
committed by jpirnay
parent 1d2584465d
commit 74a3fbd5db
3 changed files with 10 additions and 11 deletions
+1 -1
View File
@@ -910,7 +910,7 @@ void BaseTheme::drawKeyboardKey(const GfxRenderer& renderer, Rect rect, const ch
}
const bool hasSecondary = secondaryLabel != nullptr && secondaryLabel[0] != '\0';
const int primaryOffset = hasSecondary ? 0 : 0;
const int primaryOffset = 0;
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;