Fix test widget

This commit is contained in:
3djc
2021-04-19 11:47:50 +02:00
parent 9b3877681f
commit 01cc3aa99f
5 changed files with 24 additions and 5 deletions
+10 -2
View File
@@ -83,14 +83,22 @@ WidgetSettings::WidgetSettings(Window * parent, Widget * widget) :
break;
case ZoneOption::String:
new ModelTextEdit(form, grid.getFieldSlot(), widget->getOptionValue(optIdx)->stringValue, sizeof( widget->getOptionValue(optIdx)->stringValue));
break;
case ZoneOption::File:
break;
case ZoneOption::TextSize:
case ZoneOption::TextSize: {
new Choice(form, grid.getFieldSlot(), STR_FONT_SIZES, 0, FONTS_COUNT - 1,
[=]() -> int { // getValue
return (int) widget->getOptionValue(optIdx)->unsignedValue;
},
[=](int newValue) { // setValue
widget->getOptionValue(optIdx)->unsignedValue = (uint32_t) newValue;
});
break;
}
case ZoneOption::Timer: // Unsigned
{
auto tmChoice = new Choice(form, grid.getFieldSlot(), 0, TIMERS - 1,
-3
View File
@@ -33,9 +33,6 @@ class TextWidget: public Widget
void paint(BitmapBuffer * dc) override
{
// clear the background
dc->clear(DEFAULT_BGCOLOR);
// get font color from options[1]
lcdSetColor(persistentData->options[1].value.unsignedValue);