| 893 | } |
| 894 | |
| 895 | void BaseTheme::drawTextField(const GfxRenderer& renderer, Rect rect, const int textWidth, bool cursorMode, |
| 896 | int contentStartX, int contentWidth) const { |
| 897 | const auto& metrics = UITheme::getInstance().getMetrics(); |
| 898 | const int lineHeight = renderer.getLineHeight(UI_12_FONT_ID); |
| 899 | const int lineY = rect.y + rect.height + lineHeight + metrics.verticalSpacing; |
| 900 | const int thickness = cursorMode ? metrics.textFieldCursorThickness : metrics.textFieldNormalThickness; |
| 901 | if (contentWidth > 0) { |
| 902 | renderer.drawLine(rect.x + contentStartX, lineY, |
| 903 | rect.x + contentStartX + contentWidth + metrics.textFieldLineEndOffset, lineY, thickness, true); |
| 904 | } else { |
| 905 | const int lineW = textWidth + metrics.textFieldHorizontalPadding * 2; |
| 906 | const int lineStart = rect.x + (rect.width - lineW) / 2; |
| 907 | renderer.drawLine(lineStart, lineY, lineStart + lineW + metrics.textFieldLineEndOffset, lineY, thickness, true); |
| 908 | } |
| 909 | } |
| 910 | |
| 911 | void BaseTheme::drawKeyboardKey(const GfxRenderer& renderer, Rect rect, const char* label, const bool isSelected, |
| 912 | const char* secondaryLabel, const KeyboardKeyType keyType, |
no test coverage detected