BitmapBuffer: fixed RIGHT align

This commit is contained in:
Raphael Coeffic
2022-06-11 15:13:11 +02:00
committed by Raphael Coeffic
parent ad658a92a4
commit fb059887e7
+2
View File
@@ -1112,6 +1112,8 @@ coord_t BitmapBuffer::drawSizedText(coord_t x, coord_t y, const char *s,
if (flags & RIGHT) {
label_draw_dsc.align = LV_TEXT_ALIGN_RIGHT;
coords.x1 -= p.x;
coords.x2 -= p.x;
} else if (flags & CENTERED) {
label_draw_dsc.align = LV_TEXT_ALIGN_CENTER;
coords.x1 -= p.x / 2;