diff --git a/src/widgets/centeredlabel.cpp b/src/widgets/centeredlabel.cpp index b11b792..bb5f5be 100644 --- a/src/widgets/centeredlabel.cpp +++ b/src/widgets/centeredlabel.cpp @@ -5,7 +5,6 @@ // local includes #include "tftinterface.h" -#include "richtextrenderer.h" namespace espgui { CenteredLabel::CenteredLabel(int x, int y) : @@ -76,7 +75,7 @@ void CenteredLabel::redraw(TftInterface &tft, FontRenderer &fontRenderer, std::s void CenteredLabel::clear(TftInterface &tft, uint16_t bgcolor) { if (m_lastWidth || m_lastHeight) - tft.fillRect(m_x, m_y, m_lastWidth, m_lastHeight, bgcolor); + tft.fillRect(m_x - (m_lastWidth / 2), m_y, m_lastWidth, m_lastHeight, bgcolor); start(tft); }