From 9a2461c7e9b90bbb26fa8ca8e5ad9188e1ec6573 Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Wed, 1 Sep 2021 14:10:40 +1000 Subject: [PATCH] Shows pot and sliders on own line, change colour Use theme primary colour (def. black) rather than warning (def. red) Show pot/slider list on own row, under switches --- radio/src/gui/colorlcd/switch_warn_dialog.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/radio/src/gui/colorlcd/switch_warn_dialog.cpp b/radio/src/gui/colorlcd/switch_warn_dialog.cpp index 573609500..1520b8298 100644 --- a/radio/src/gui/colorlcd/switch_warn_dialog.cpp +++ b/radio/src/gui/colorlcd/switch_warn_dialog.cpp @@ -80,11 +80,11 @@ void SwitchWarnDialog::paint(BitmapBuffer * dc) unsigned int state = ((g_model.switchWarningState >> (3 * i)) & 0x07); if (state && state - 1 != ((switches_states >> (i * 2)) & 0x03)) { if (y < LCD_H) { - x = drawSwitch(dc, x, y, SWSRC_FIRST_SWITCH + i * 3 + state - 1, FONT(BOLD)); + x = drawSwitch(dc, x, y, SWSRC_FIRST_SWITCH + i * 3 + state - 1, COLOR_THEME_PRIMARY1 | FONT(BOLD)); x += 5; } else { - dc->drawText(x, y, "...", FONT(BOLD)); + dc->drawText(x, y, "...", COLOR_THEME_PRIMARY1 | FONT(BOLD)); break; } } @@ -92,6 +92,8 @@ void SwitchWarnDialog::paint(BitmapBuffer * dc) } if (g_model.potsWarnMode) { + x = ALERT_MESSAGE_LEFT; + y += 20; for (int i = 0; i < NUM_POTS + NUM_SLIDERS; i++) { if (!IS_POT_SLIDER_AVAILABLE(POT1 + i)) { continue; @@ -103,11 +105,11 @@ void SwitchWarnDialog::paint(BitmapBuffer * dc) // TODO add an helper strncpy(s, &STR_VSRCRAW[1 + (NUM_STICKS + 1 + i) * STR_VSRCRAW[0]], STR_VSRCRAW[0]); s[int(STR_VSRCRAW[0])] = '\0'; - dc->drawText(x, y, s, COLOR_THEME_WARNING | FONT(BOLD)); - y += 15; + dc->drawText(x, y, s, COLOR_THEME_PRIMARY1 | FONT(BOLD)); + x += 40; } else { - dc->drawText(x, y, "...", COLOR_THEME_WARNING | FONT(BOLD)); + dc->drawText(x, y, "...", COLOR_THEME_PRIMARY1 | FONT(BOLD)); } } }