Small fixes

This commit is contained in:
Raphael Coeffic
2021-06-14 13:01:37 +02:00
parent 54a87bc180
commit 6d2d740d95
3 changed files with 6 additions and 3 deletions
+1 -2
View File
@@ -76,7 +76,7 @@ void TextButton::paint(BitmapBuffer * dc)
if (bgColorHandler) { if (bgColorHandler) {
bgColor = bgColorHandler(); bgColor = bgColorHandler();
} else if (checked()) { } else if (checked()) {
bgColor = EDIT_MARKER_COLOR; bgColor = HIGHLIGHT_COLOR;
} else if (hasFocus()) { } else if (hasFocus()) {
bgColor = FOCUS_BGCOLOR; bgColor = FOCUS_BGCOLOR;
} }
@@ -88,7 +88,6 @@ void TextButton::paint(BitmapBuffer * dc)
} else { } else {
dc->drawSolidFilledRect(0, 0, rect.w, rect.h, bgColor); dc->drawSolidFilledRect(0, 0, rect.w, rect.h, bgColor);
} }
textColor = FOCUS_COLOR;
} }
else { else {
dc->drawSolidFilledRect(0, 0, rect.w, rect.h, bgColor); dc->drawSolidFilledRect(0, 0, rect.w, rect.h, bgColor);
+3 -1
View File
@@ -104,7 +104,9 @@ void Choice::setValues(const char * const values[])
void Choice::paint(BitmapBuffer * dc) void Choice::paint(BitmapBuffer * dc)
{ {
FormField::paint(dc); FormField::paint(dc);
theme->drawChoice(dc, this, textHandler ? textHandler(getValue()).c_str() : values[getValue() - vmin].c_str()); theme->drawChoice(dc, this,
textHandler ? textHandler(getValue()).c_str()
: values[getValue() - vmin].c_str());
} }
#if defined(HARDWARE_KEYS) #if defined(HARDWARE_KEYS)
+2
View File
@@ -227,6 +227,8 @@ void Menu::onEvent(event_t event)
void Menu::paint(BitmapBuffer * dc) void Menu::paint(BitmapBuffer * dc)
{ {
ModalWindow::paint(dc);
rect_t r(content->getRect()); rect_t r(content->getRect());
if (toolbar) { if (toolbar) {
r.x = toolbar->left(); r.x = toolbar->left();