Cosmetics
This commit is contained in:
+3
-2
@@ -32,17 +32,18 @@ void NumberEdit::paint(BitmapBuffer * dc)
|
||||
{
|
||||
FormField::paint(dc);
|
||||
|
||||
auto value = getValue();
|
||||
|
||||
LcdFlags textColor;
|
||||
if (editMode)
|
||||
textColor = FOCUS_COLOR;
|
||||
else if (hasFocus())
|
||||
textColor = FOCUS_BGCOLOR;
|
||||
else if (enabled)
|
||||
else if (enabled && (value != 0 || zeroText.empty()))
|
||||
textColor = DEFAULT_COLOR;
|
||||
else
|
||||
textColor = DISABLE_COLOR;
|
||||
|
||||
int32_t value = getValue();
|
||||
if (displayFunction)
|
||||
displayFunction(dc, textColor, value);
|
||||
else if (value == 0 && !zeroText.empty())
|
||||
|
||||
@@ -44,6 +44,9 @@ void TextEdit::paint(BitmapBuffer * dc)
|
||||
const char * displayedValue = value;
|
||||
LcdFlags textColor;
|
||||
if (hasFocus()) {
|
||||
if (strlen(value) == 0) {
|
||||
displayedValue = "---";
|
||||
}
|
||||
textColor = FOCUS_BGCOLOR;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user