diff --git a/main/widgets/menudisplaywithtime.cpp b/main/widgets/menudisplaywithtime.cpp index 337f6cf..d27294b 100644 --- a/main/widgets/menudisplaywithtime.cpp +++ b/main/widgets/menudisplaywithtime.cpp @@ -14,7 +14,7 @@ void MenuDisplayWithTime::start() void MenuDisplayWithTime::redraw() { Base::redraw(); - tft.setTextFont(2); + tft.setTextFont(m_use_big_font() ? 4 : 2); m_label_currentTime.redraw(fmt::format("&7Time: {}", local_clock_string())); } diff --git a/main/widgets/menudisplaywithtime.h b/main/widgets/menudisplaywithtime.h index 2f809d6..6964beb 100644 --- a/main/widgets/menudisplaywithtime.h +++ b/main/widgets/menudisplaywithtime.h @@ -1,6 +1,7 @@ #pragma once #include +#include namespace bobbygui { class MenuDisplayWithTime : @@ -11,5 +12,14 @@ public: void start() override; void redraw() override; espgui::Label m_label_currentTime{145, 6}; +private: + virtual bool m_use_big_font() const + { +#ifdef MENU_DISPLAY_USE_BIG_TIME + return true; +#else + return false; +#endif + } }; } // namespace