OS theme colors as suggested by JimB40 in #506 #540

Did the scripted search and replace of theme colors to introduce 11 new colors replacing 40 old colors.
This commit is contained in:
jfrickmann
2021-08-05 21:00:13 -04:00
parent 4aade1d0da
commit 27c067553b
15 changed files with 74 additions and 74 deletions
+8 -8
View File
@@ -48,34 +48,34 @@ void TextEdit::paint(BitmapBuffer * dc)
if (editMode) {
dc->drawSizedText(FIELD_PADDING_LEFT, FIELD_PADDING_TOP, value, length,
FOCUS_COLOR);
COLOR_THEME_PRIMARY2);
coord_t left = (cursorPos == 0 ? 0 : getTextWidth(value, cursorPos));
#if defined(SOFTWARE_KEYBOARD)
dc->drawSolidFilledRect(left + 2, 2, 2, height() - 4, FOCUS_COLOR);
dc->drawSolidFilledRect(left + 2, 2, 2, height() - 4, COLOR_THEME_PRIMARY2);
#else
char s[] = {value[cursorPos], '\0'};
dc->drawSolidFilledRect(FIELD_PADDING_LEFT + left - 1,
FIELD_PADDING_TOP - 1, getTextWidth(s, 1) + 1,
height() - 2, FOCUS_COLOR);
height() - 2, COLOR_THEME_PRIMARY2);
dc->drawText(FIELD_PADDING_LEFT + left, FIELD_PADDING_TOP, s,
DEFAULT_COLOR);
COLOR_THEME_SECONDARY1);
#endif
} else {
const char * displayedValue = value;
LcdFlags textColor = FOCUS_COLOR;
LcdFlags textColor = COLOR_THEME_PRIMARY2;
if (hasFocus()) {
if (strlen(value) == 0) {
displayedValue = "---";
}
textColor = FOCUS_COLOR;
textColor = COLOR_THEME_PRIMARY2;
}
else {
if (strlen(value) == 0) {
displayedValue = "---";
textColor = DISABLE_COLOR;
textColor = COLOR_THEME_DISABLED;
}
else {
textColor = DEFAULT_COLOR;
textColor = COLOR_THEME_SECONDARY1;
}
}
dc->drawSizedText(FIELD_PADDING_LEFT, FIELD_PADDING_TOP, displayedValue, length, textColor);