ColorEdit shall use it's own color instead of modifying the color table
This commit is contained in:
+3
-4
@@ -41,19 +41,18 @@ class ColorBox: public Window {
|
|||||||
|
|
||||||
void paint(BitmapBuffer * dc) override
|
void paint(BitmapBuffer * dc) override
|
||||||
{
|
{
|
||||||
lcdSetColor(color);
|
|
||||||
dc->drawSolidFilledRect(0, 0, width(), height(), DEFAULT_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;
|
color = value;
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
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):
|
ColorEdit::ColorEdit(FormGroup * parent, const rect_t & rect, std::function<uint16_t()> getValue, std::function<void(uint16_t)> setValue):
|
||||||
|
|||||||
Reference in New Issue
Block a user