aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-29 15:40:37 +0600
committerEugene Sandulenko2016-07-03 12:20:37 +0200
commit559ca37dafea7fa07f2453ee9221df072c501b22 (patch)
treefb8e1c602662c2c3ed3ce6cad03e66ada8570b5d /gui/widgets
parent5868d6d47150f3595a499936566eafc717e63802 (diff)
downloadscummvm-rg350-559ca37dafea7fa07f2453ee9221df072c501b22.tar.gz
scummvm-rg350-559ca37dafea7fa07f2453ee9221df072c501b22.tar.bz2
scummvm-rg350-559ca37dafea7fa07f2453ee9221df072c501b22.zip
GUI: Add VectorRendererSpec::drawTriangleClip()
Diffstat (limited to 'gui/widgets')
-rw-r--r--gui/widgets/scrollbar.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/gui/widgets/scrollbar.cpp b/gui/widgets/scrollbar.cpp
index f1306b9c4a..d8bcb18336 100644
--- a/gui/widgets/scrollbar.cpp
+++ b/gui/widgets/scrollbar.cpp
@@ -26,6 +26,7 @@
#include "gui/widgets/scrollbar.h"
#include "gui/gui-manager.h"
#include "gui/ThemeEngine.h"
+#include "gui/widgets/scrollcontainer.h"
namespace GUI {
@@ -202,7 +203,11 @@ void ScrollBarWidget::drawWidget() {
state = ThemeEngine::kScrollbarStateSlider;
}
- g_gui.theme()->drawScrollbar(Common::Rect(_x, _y, _x+_w, _y+_h), _sliderPos, _sliderHeight, state, _state);
+ Common::Rect clipRect = getBossClipRect();
+ //scrollbar is not a usual child of ScrollContainerWidget, so it gets this special treatment
+ if (dynamic_cast<ScrollContainerWidget *>(_boss))
+ clipRect.right += _w;
+ g_gui.theme()->drawScrollbarClip(Common::Rect(_x, _y, _x+_w, _y+_h), clipRect, _sliderPos, _sliderHeight, state, _state);
}
} // End of namespace GUI