aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets/tab.cpp
diff options
context:
space:
mode:
authorAlexander Tkachev2016-07-12 22:37:57 +0600
committerAlexander Tkachev2016-07-12 22:37:57 +0600
commit64a79fd1ab4270ed50ef62cf0a795c842eb4d72a (patch)
tree4d7b9ff7ff40d55870a55890927874f7f999d395 /gui/widgets/tab.cpp
parent53ab0b28051eb346aa6a05c8c60e77d0f4cfa3cc (diff)
downloadscummvm-rg350-64a79fd1ab4270ed50ef62cf0a795c842eb4d72a.tar.gz
scummvm-rg350-64a79fd1ab4270ed50ef62cf0a795c842eb4d72a.tar.bz2
scummvm-rg350-64a79fd1ab4270ed50ef62cf0a795c842eb4d72a.zip
GUI: Fix TabWidget height issues
Changes theme stx files to specify TabWidget's type. That fixes wrong TabWidget height. Changes TabWidget's getHeight() to return not only "children" height, but also tabs height. That fixes wrong clipping area. Changes Widget's findWidget to use getHeight(). That fixes bug when widgets in the bottom of TabWidget were not reacting to the mouse events.
Diffstat (limited to 'gui/widgets/tab.cpp')
-rw-r--r--gui/widgets/tab.cpp8
1 files changed, 8 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;