Expose title dimensions as variables

This commit is contained in:
Florian Wetzel
2025-02-20 16:11:05 +01:00
parent 13dd0481fb
commit 068ef657e8
2 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,7 @@ void DisplayWithTitle::initScreen(TftInterface &tft)
// tft.fillRect(0, 0, tft.width(), 35, TFT_GREY);
tft.fillRect(0, 34, tft.width(), 2, TFT_GREY);
tft.fillRect(0, TITLE_HEIGHT, tft.width(), TITLE_BORDER, TFT_GREY);
}
void DisplayWithTitle::redraw(TftInterface &tft)

View File

@ -14,6 +14,9 @@ class DisplayWithTitle :
using Base = Display;
public:
constexpr static int TITLE_HEIGHT = 34;
constexpr static int TITLE_BORDER = 2;
TitleInterface *asTitleInterface() override { return this; }
const TitleInterface *asTitleInterface() const override { return this; }