Merge with latest 2.3
This commit is contained in:
+2
-2
@@ -562,11 +562,11 @@ coord_t BitmapBuffer::drawSizedText(coord_t x, coord_t y, const char * s, uint8_
|
||||
c -= 1;
|
||||
c += CJK_FIRST_LETTER_INDEX;
|
||||
uint8_t width = drawChar(x, y, font, fontspecs, c, flags);
|
||||
INCREMENT_POS(width + 1);
|
||||
INCREMENT_POS(width + CHAR_SPACING);
|
||||
}
|
||||
else if (c >= 0x20) {
|
||||
uint8_t width = drawChar(x, y, font, fontspecs, getMappedChar(c), flags);
|
||||
INCREMENT_POS(width + 1);
|
||||
INCREMENT_POS(width + CHAR_SPACING);
|
||||
}
|
||||
else if (c == '\n') {
|
||||
pos = orig_pos;
|
||||
|
||||
+3
-1
@@ -102,7 +102,9 @@ void TextButton::paint(BitmapBuffer * dc)
|
||||
}
|
||||
}
|
||||
|
||||
dc->drawText(rect.w / 2, (rect.h - getFontHeight(textFlags)) / 2, text.c_str(), CENTERED | textFlags | textColor);
|
||||
TRACE("ICI text=%s rect.h=%d fontHeight=%d", text.c_str(), rect.h, getFontHeight(textFlags));
|
||||
|
||||
dc->drawText(rect.w / 2, 1 + (rect.h - getFontHeight(textFlags)) / 2, text.c_str(), CENTERED | textFlags | textColor);
|
||||
}
|
||||
|
||||
void IconButton::paint(BitmapBuffer * dc)
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ void FormGroup::addField(FormField * field, bool front)
|
||||
link(last, field);
|
||||
last = field;
|
||||
}
|
||||
if (windowFlags & FORM_FORWARD_FOCUS) {
|
||||
if (previous && (windowFlags & FORM_FORWARD_FOCUS)) {
|
||||
last->setNextField(this);
|
||||
link(previous, first);
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ void StaticText::paint(BitmapBuffer * dc)
|
||||
if (windowFlags & BUTTON_BACKGROUND)
|
||||
dc->drawSolidFilledRect(0, 0, rect.w, rect.h, DISABLE_COLOR);
|
||||
if (textFlags & CENTERED)
|
||||
dc->drawText(rect.w / 2, (1 + rect.h - getFontHeight(textFlags)) / 2, text.c_str(), textFlags);
|
||||
dc->drawText(rect.w / 2, 1 + (rect.h - getFontHeight(textFlags)) / 2, text.c_str(), textFlags);
|
||||
else if (textFlags & RIGHT)
|
||||
dc->drawText(rect.w, FIELD_PADDING_TOP, text.c_str(), textFlags);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user