2021-11-01 22:21:29 +01:00
|
|
|
#include "displaywithtitle.h"
|
|
|
|
|
|
|
|
|
|
// local includes
|
2022-12-01 19:50:29 +01:00
|
|
|
#include "tftinterface.h"
|
|
|
|
|
#include "tftcolors.h"
|
2021-11-01 22:21:29 +01:00
|
|
|
|
|
|
|
|
namespace espgui {
|
|
|
|
|
|
2022-12-01 19:50:29 +01:00
|
|
|
void DisplayWithTitle::initScreen(TftInterface &tft)
|
2021-11-01 22:21:29 +01:00
|
|
|
{
|
2022-12-01 19:50:29 +01:00
|
|
|
Base::initScreen(tft);
|
2021-11-01 22:21:29 +01:00
|
|
|
|
2022-12-01 19:50:29 +01:00
|
|
|
m_titleLabel.start(tft);
|
2023-01-11 14:41:24 +01:00
|
|
|
|
2023-01-23 13:28:38 +01:00
|
|
|
// tft.fillRect(0, 0, tft.width(), 35, TFT_GREY);
|
2023-01-11 14:41:24 +01:00
|
|
|
|
2023-01-23 13:28:38 +01:00
|
|
|
tft.fillRect(0, 34, tft.width(), 2, TFT_GREY);
|
2021-11-01 22:21:29 +01:00
|
|
|
}
|
|
|
|
|
|
2022-12-01 19:50:29 +01:00
|
|
|
void DisplayWithTitle::redraw(TftInterface &tft)
|
2021-11-01 22:21:29 +01:00
|
|
|
{
|
2022-12-01 19:50:29 +01:00
|
|
|
Base::redraw(tft);
|
2021-11-01 22:21:29 +01:00
|
|
|
|
2023-01-23 13:28:38 +01:00
|
|
|
m_titleLabel.redraw(tft, title(), TFT_GREY, TFT_BLACK, 4);
|
2021-11-01 22:21:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace espgui
|