A bit more tuning
This commit is contained in:
+1
-1
@@ -253,7 +253,7 @@ void FormGroup::paint(BitmapBuffer * dc)
|
||||
dc->drawSolidRect(0, 0, rect.w, rect.h, 2, FOCUS_BGCOLOR);
|
||||
}
|
||||
else if (!(windowFlags & FORM_BORDER_FOCUS_ONLY)) {
|
||||
dc->drawSolidRect(0, 0, rect.w, rect.h, 1, DISABLE_COLOR);
|
||||
dc->drawSolidRect(0, 0, rect.w, rect.h, 1, FIELD_FRAME_COLOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-4
@@ -34,21 +34,23 @@ void StaticText::paint(BitmapBuffer * dc)
|
||||
else
|
||||
x = 0;
|
||||
|
||||
coord_t y = (textFlags & VCENTERED) ? (rect.h - getFontHeight(textFlags)) / 2 : FIELD_PADDING_TOP;
|
||||
coord_t y = (textFlags & VCENTERED) ? (rect.h - getFontHeight(textFlags)) / 2
|
||||
: FIELD_PADDING_TOP;
|
||||
|
||||
auto start = text.c_str();
|
||||
auto nextline = findNextLine(start);
|
||||
if (nextline) {
|
||||
auto current = start;
|
||||
do {
|
||||
dc->drawText(x, y, text.substr(current - start, nextline - current).c_str(), textFlags);
|
||||
dc->drawText(x, y,
|
||||
text.substr(current - start, nextline - current).c_str(),
|
||||
textFlags);
|
||||
current = nextline + 1;
|
||||
nextline = findNextLine(current);
|
||||
y += getFontHeight(textFlags) + 2;
|
||||
} while (nextline);
|
||||
dc->drawText(x, y, current, textFlags);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dc->drawText(x, y, start, textFlags);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user