1818#include " dispDrvBase.h"
1919#include < Adafruit_ST7789.h>
2020
21- #define ST7789_TEXT_SZ_DEFAULT 2 // /< Default text size for ST7789 displays
2221#define ST7789_STATUSBAR_HEIGHT 20 // /< Default status bar height
2322#define ST7789_STATUSBAR_ICON_SZ 16 // /< Default status bar icon size
2423#define ST7789_STATUSBAR_ICON_SPACING \
@@ -81,7 +80,6 @@ class dispDrvSt7789 : public dispDrvBase {
8180
8281 _display->init (_width, _height);
8382 _display->setRotation (_rotation);
84- setTextSize (ST7789_TEXT_SZ_DEFAULT);
8583 _display->fillScreen (ST77XX_BLACK);
8684 _display->setTextColor (ST77XX_WHITE);
8785
@@ -100,20 +98,6 @@ class dispDrvSt7789 : public dispDrvBase {
10098 return true ;
10199 }
102100
103- /* !
104- @brief Sets the text size for the display.
105- @param s
106- The text size to set.
107- @note This method overrides the base class method to provide specific
108- functionality for the ST7789 driver.
109- */
110- void setTextSize (uint8_t s) override {
111- if (!_display)
112- return ;
113- _text_sz = s;
114- _display->setTextSize (s);
115- }
116-
117101 /* !
118102 @brief Displays the splash screen on the display.
119103 */
@@ -176,6 +160,12 @@ class dispDrvSt7789 : public dispDrvBase {
176160 _display->drawBitmap (_statusbar_icon_battery_x, _statusbar_icons_y,
177161 epd_bmp_bat_full, ST7789_STATUSBAR_ICON_SZ,
178162 ST7789_STATUSBAR_ICON_SZ, ST77XX_BLACK);
163+
164+ // Reset text color and size for main text area
165+ _display->setTextColor (ST77XX_WHITE);
166+ WS_DEBUG_PRINTLN (" SB Text Size:" );
167+ WS_DEBUG_PRINTLN (_text_sz);
168+ _display->setTextSize (_text_sz);
179169 }
180170
181171 /* !
@@ -254,8 +244,6 @@ class dispDrvSt7789 : public dispDrvBase {
254244 if (_display == nullptr )
255245 return ;
256246
257- _display->setTextColor (ST77XX_WHITE);
258-
259247 // Clear only the area below the status bar
260248 _display->fillRect (0 , ST7789_STATUSBAR_HEIGHT, _width,
261249 _height - ST7789_STATUSBAR_HEIGHT, ST77XX_BLACK);
0 commit comments