From 8c49a072428d2cf740aa94e91891c5c70cd40cba Mon Sep 17 00:00:00 2001 From: 3djc Date: Sun, 18 Apr 2021 14:29:30 +0200 Subject: [PATCH] Some fixes to value widget --- radio/src/gui/colorlcd/widget_settings.cpp | 4 ++++ radio/src/gui/colorlcd/widgets/value.cpp | 8 ++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/radio/src/gui/colorlcd/widget_settings.cpp b/radio/src/gui/colorlcd/widget_settings.cpp index 1f2f7ee46..a82512ef0 100644 --- a/radio/src/gui/colorlcd/widget_settings.cpp +++ b/radio/src/gui/colorlcd/widget_settings.cpp @@ -23,6 +23,8 @@ #include "widget_settings.h" #include "libopenui.h" +#define SET_DIRTY() storageDirty(EE_MODEL) + static const rect_t widgetSettingsDialogRect = { LCD_W / 10, // x LCD_H / 4, // y @@ -118,12 +120,14 @@ WidgetSettings::WidgetSettings(Window * parent, Widget * widget) : break; case ZoneOption::Color: + for (uint8_t part = 0; part < 3; part++) new ColorEdit(form, grid.getFieldSlot(), [=]() -> int { // getValue return (int) widget->getOptionValue(optIdx)->unsignedValue; }, [=](int newValue) { // setValue widget->getOptionValue(optIdx)->unsignedValue = (uint32_t) newValue; + SET_DIRTY(); }); break; } diff --git a/radio/src/gui/colorlcd/widgets/value.cpp b/radio/src/gui/colorlcd/widgets/value.cpp index f36dde97f..2556a310f 100644 --- a/radio/src/gui/colorlcd/widgets/value.cpp +++ b/radio/src/gui/colorlcd/widgets/value.cpp @@ -33,10 +33,6 @@ class ValueWidget: public Widget void paint(BitmapBuffer * dc) override { - // draw the background and border - dc->clear(DEFAULT_BGCOLOR); - dc->drawFilledRect(0,0, width(), height(), SOLID, MAINVIEW_PANES_COLOR | OPACITY(5)); - // get source from options[0] mixsrc_t field = persistentData->options[0].value.unsignedValue; @@ -51,8 +47,8 @@ class ValueWidget: public Widget yValue = 14; xLabel = 0; yLabel = 0; - attrValue = LEFT | NO_UNIT | FONT(XS); - attrLabel = FONT(XS); + attrValue = LEFT | NO_UNIT | FONT(L); + attrLabel = LEFT; } else if (height() < 50) { xValue = width() - NUMBERS_PADDING;