From 2c4ec3f3c511485fd023925cd13138e31f54a188 Mon Sep 17 00:00:00 2001 From: "kkoenig1@optonline.com" Date: Sun, 21 Nov 2021 05:24:54 -0500 Subject: [PATCH] fixed compiler warning as per Ritso --- radio/src/gui/colorlcd/listbox.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/radio/src/gui/colorlcd/listbox.cpp b/radio/src/gui/colorlcd/listbox.cpp index c1a65afac..42001496d 100644 --- a/radio/src/gui/colorlcd/listbox.cpp +++ b/radio/src/gui/colorlcd/listbox.cpp @@ -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);