fix: resolve 6 cppcheck low-style warnings in keyboard code
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user