aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-24 23:26:25 +0600
committerEugene Sandulenko2016-07-03 12:20:03 +0200
commit0ae4409138f828ee7eb0241db44f43d68cec85d8 (patch)
treec9aca05fe9215661c2450e9368c97d04d7491c94 /gui/widgets
parent24963ac97d85a3d78d5b36d63be6cea6f63d178d (diff)
downloadscummvm-rg350-0ae4409138f828ee7eb0241db44f43d68cec85d8.tar.gz
scummvm-rg350-0ae4409138f828ee7eb0241db44f43d68cec85d8.tar.bz2
scummvm-rg350-0ae4409138f828ee7eb0241db44f43d68cec85d8.zip
GUI: Add ThemeLayoutTabWidget
Diffstat (limited to 'gui/widgets')
-rw-r--r--gui/widgets/scrollcontainer.cpp5
-rw-r--r--gui/widgets/tab.cpp6
2 files changed, 6 insertions, 5 deletions
diff --git a/gui/widgets/scrollcontainer.cpp b/gui/widgets/scrollcontainer.cpp
index 1173b08279..eca0279c55 100644
--- a/gui/widgets/scrollcontainer.cpp
+++ b/gui/widgets/scrollcontainer.cpp
@@ -51,10 +51,7 @@ void ScrollContainerWidget::init() {
void ScrollContainerWidget::recalc() {
int scrollbarWidth = g_gui.xmlEval()->getVar("Globals.Scrollbar.Width", 0);
-
- //calculate _limitH - available height (boss's height - boss's "offset")
- int d = _boss->getChildY() - _boss->getAbsY();
- _limitH = _boss->getHeight() - d;
+ _limitH = _h;
//calculate virtual height
const int spacing = g_gui.xmlEval()->getVar("Global.Font.Height", 16); //on the bottom
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index 689bf37e1b..393f63aac0 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -80,6 +80,8 @@ TabWidget::~TabWidget() {
}
int16 TabWidget::getChildY() const {
+ // NOTE: if you change that, make sure to do the same
+ // changes in the ThemeLayoutTabWidget (gui/ThemeLayout.cpp)
return getAbsY() + _tabHeight;
}
@@ -258,6 +260,8 @@ void TabWidget::adjustTabs(int value) {
void TabWidget::reflowLayout() {
Widget::reflowLayout();
+ // NOTE: if you change that, make sure to do the same
+ // changes in the ThemeLayoutTabWidget (gui/ThemeLayout.cpp)
_tabHeight = g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Height");
_tabWidth = g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Width");
_titleVPad = g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Padding.Top");
@@ -304,7 +308,7 @@ void TabWidget::drawWidget() {
for (int i = _firstVisibleTab; i < (int)_tabs.size(); ++i) {
tabs.push_back(_tabs[i].title);
}
- g_gui.theme()->drawDialogBackground(Common::Rect(_x + _bodyLP, _y + _bodyTP, _x+_w-_bodyRP, _y+_h-_bodyBP), _bodyBackgroundType);
+ g_gui.theme()->drawDialogBackground(Common::Rect(_x + _bodyLP, _y + _bodyTP, _x+_w-_bodyRP, _y+_h-_bodyBP+_tabHeight), _bodyBackgroundType);
g_gui.theme()->drawTab(Common::Rect(_x, _y, _x+_w, _y+_h), _tabHeight, _tabWidth, tabs, _activeTab - _firstVisibleTab, 0, _titleVPad);
}