fixed compiler warning as per Ritso

This commit is contained in:
kkoenig1@optonline.com
2021-11-21 12:53:31 +01:00
committed by Risto
parent a1d279a552
commit 2c4ec3f3c5
+3 -6
View File
@@ -67,7 +67,7 @@ void ListBase::drawLine(BitmapBuffer *dc, const rect_t &rect, uint32_t index, Lc
int x = rect.x;
if ((uint32_t)activeIndex == index) {
LcdFlags circleColor = index == selected ? COLOR_THEME_PRIMARY2 : COLOR_THEME_PRIMARY1;
LcdFlags circleColor = index == (uint32_t) selected ? COLOR_THEME_PRIMARY2 : COLOR_THEME_PRIMARY1;
auto textWidth = getTextWidth(name.c_str(), name.length(), lcdFlags);
auto fontHeight = getFontHeight(FONT(STD));
@@ -83,12 +83,9 @@ void ListBase::paint(BitmapBuffer *dc)
int curY = 0;
for (int n = 0; n < (int)names.size(); n++) {
//if (n == selected) {
dc->drawSolidFilledRect(1, curY, rect.w - 2, lineHeight, n == selected ? COLOR_THEME_FOCUS : COLOR_THEME_PRIMARY2);
//}
dc->drawSolidFilledRect(1, curY, rect.w - 2, lineHeight, n == selected ? COLOR_THEME_FOCUS : COLOR_THEME_PRIMARY2);
LcdFlags textColor =
n == selected ? COLOR_THEME_PRIMARY2 : COLOR_THEME_SECONDARY1;
LcdFlags textColor = n == selected ? COLOR_THEME_PRIMARY2 : COLOR_THEME_SECONDARY1;
auto fontHeight = getFontHeight(FONT(STD));
drawLine(dc, { 8, curY + (lineHeight - fontHeight) / 2, rect.w, lineHeight}, n, textColor);