diff options
author | Bastien Bouclet | 2018-11-14 20:16:34 +0100 |
---|---|---|
committer | Bastien Bouclet | 2018-11-14 20:27:41 +0100 |
commit | 7c570d9b253206e906fc9cc38c20083e043a0ed8 (patch) | |
tree | f0beafb4f44d3aaa941ba9f718e67bc8370115b9 /gui/widgets | |
parent | 91c463184d9a2ed429baae343039f28c9671d523 (diff) | |
download | scummvm-rg350-7c570d9b253206e906fc9cc38c20083e043a0ed8.tar.gz scummvm-rg350-7c570d9b253206e906fc9cc38c20083e043a0ed8.tar.bz2 scummvm-rg350-7c570d9b253206e906fc9cc38c20083e043a0ed8.zip |
GUI: Don't display the ScrollContainer background inside tabs
Fixes #10645.
Diffstat (limited to 'gui/widgets')
-rw-r--r-- | gui/widgets/scrollcontainer.cpp | 8 | ||||
-rw-r--r-- | gui/widgets/scrollcontainer.h | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gui/widgets/scrollcontainer.cpp b/gui/widgets/scrollcontainer.cpp index 6578d26feb..7e3f50d3bb 100644 --- a/gui/widgets/scrollcontainer.cpp +++ b/gui/widgets/scrollcontainer.cpp @@ -41,6 +41,7 @@ ScrollContainerWidget::ScrollContainerWidget(GuiObject *boss, const Common::Stri void ScrollContainerWidget::init() { setFlags(WIDGET_ENABLED); _type = kScrollContainerWidget; + _backgroundType = ThemeEngine::kDialogBackgroundDefault; _verticalScroll = new ScrollBarWidget(this, _w-16, 0, 16, _h); _verticalScroll->setTarget(this); _scrolledX = 0; @@ -145,8 +146,7 @@ void ScrollContainerWidget::reflowLayout() { } void ScrollContainerWidget::drawWidget() { - g_gui.theme()->drawDialogBackground(Common::Rect(_x, _y, _x + _w, _y + getHeight() - 1), - ThemeEngine::kDialogBackgroundDefault); + g_gui.theme()->drawDialogBackground(Common::Rect(_x, _y, _x + _w, _y + getHeight() - 1), _backgroundType); } bool ScrollContainerWidget::containsWidget(Widget *w) const { @@ -169,4 +169,8 @@ Common::Rect ScrollContainerWidget::getClipRect() const { return Common::Rect(getAbsX(), getAbsY(), getAbsX() + _w, getAbsY() + getHeight()); } +void ScrollContainerWidget::setBackgroundType(ThemeEngine::DialogBackground backgroundType) { + _backgroundType = backgroundType; +} + } // End of namespace GUI diff --git a/gui/widgets/scrollcontainer.h b/gui/widgets/scrollcontainer.h index 49326ac6e9..01d9a195fa 100644 --- a/gui/widgets/scrollcontainer.h +++ b/gui/widgets/scrollcontainer.h @@ -34,6 +34,7 @@ class ScrollContainerWidget: public Widget, public CommandSender { int16 _scrolledX, _scrolledY; uint16 _limitH; uint32 _reflowCmd; + ThemeEngine::DialogBackground _backgroundType; void recalc(); @@ -51,6 +52,9 @@ public: Common::Rect getClipRect() const override; void handleMouseWheel(int x, int y, int direction); + + void setBackgroundType(ThemeEngine::DialogBackground backgroundType); + 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. |