ColorEdit shall use it's own color instead of modifying the color table

This commit is contained in:
Raphael Coeffic
2021-05-07 22:41:43 +02:00
parent d274f6ac7f
commit 596ef31384
+3 -4
View File
@@ -41,19 +41,18 @@ class ColorBox: public Window {
void paint(BitmapBuffer * dc) override
{
lcdSetColor(color);
dc->drawSolidFilledRect(0, 0, width(), height(), DEFAULT_COLOR);
dc->drawSolidFilledRect(1, 1, width() - 2, height() - 2, CUSTOM_COLOR);
dc->drawSolidFilledRect(1, 1, width() - 2, height() - 2, color << 16);
}
void setColor(LcdFlags value)
void setColor(pixel_t value)
{
color = value;
invalidate();
}
protected:
LcdFlags color;
pixel_t color;
};
ColorEdit::ColorEdit(FormGroup * parent, const rect_t & rect, std::function<uint16_t()> getValue, std::function<void(uint16_t)> setValue):