Static now accepts right aligned text
This commit is contained in:
+2
@@ -26,6 +26,8 @@ void StaticText::paint(BitmapBuffer * dc)
|
||||
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);
|
||||
else if (textFlags & RIGHT)
|
||||
dc->drawText(rect.w, FIELD_PADDING_TOP, text.c_str(), textFlags);
|
||||
else
|
||||
dc->drawText(0, 0 + FIELD_PADDING_TOP, text.c_str(), textFlags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user