diff options
Diffstat (limited to 'gui/widgets')
-rw-r--r-- | gui/widgets/tab.cpp | 8 | ||||
-rw-r--r-- | gui/widgets/tab.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp index 784e438952..15e6a9d370 100644 --- a/gui/widgets/tab.cpp +++ b/gui/widgets/tab.cpp @@ -85,6 +85,14 @@ int16 TabWidget::getChildY() const { return getAbsY() + _tabHeight; } +uint16 TabWidget::getHeight() const { + // NOTE: if you change that, make sure to do the same + // changes in the ThemeLayoutTabWidget (gui/ThemeLayout.cpp) + // NOTE: this height is used for clipping, so it *includes* + // tabs, because it starts from getAbsY(), not getChildY() + return _h + _tabHeight; +} + int TabWidget::addTab(const String &title) { // Add a new tab page Tab newTab; diff --git a/gui/widgets/tab.h b/gui/widgets/tab.h index 148f164fbb..17b85986b5 100644 --- a/gui/widgets/tab.h +++ b/gui/widgets/tab.h @@ -110,6 +110,7 @@ protected: // We overload getChildY to make sure child widgets are positioned correctly. // Essentially this compensates for the space taken up by the tab title header. virtual int16 getChildY() const; + virtual uint16 getHeight() const; virtual void drawWidget(); |