Changes #30

Merged
CommanderRedYT merged 4 commits from changes into main 2023-02-15 17:29:24 +01:00
2 changed files with 37 additions and 2 deletions
Showing only changes of commit ddd276e681 - Show all commits

View File

@@ -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);
}