aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeNew.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2006-04-18 18:50:07 +0000
committerJohannes Schickel2006-04-18 18:50:07 +0000
commita9431edca2f5ed3a8e6753662822393755bc69e6 (patch)
treed3425dc1cef9efd1ad27a56c94852ec5b6e26a9a /gui/ThemeNew.cpp
parent1ae205a2412eb0503e2ed26245f653e7047af982 (diff)
downloadscummvm-rg350-a9431edca2f5ed3a8e6753662822393755bc69e6.tar.gz
scummvm-rg350-a9431edca2f5ed3a8e6753662822393755bc69e6.tar.bz2
scummvm-rg350-a9431edca2f5ed3a8e6753662822393755bc69e6.zip
- Fixed popup widget for --force-1x-overlay with new theme
- adds support for highlightened popupwidgets svn-id: r22012
Diffstat (limited to 'gui/ThemeNew.cpp')
-rw-r--r--gui/ThemeNew.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp
index 51080d160f..60b160b03a 100644
--- a/gui/ThemeNew.cpp
+++ b/gui/ThemeNew.cpp
@@ -637,13 +637,18 @@ void ThemeNew::drawPopUpWidget(const Common::Rect &r, const Common::String &sel,
(state == kStateDisabled) ? -30 : 256, start, end, _gradientFactors[kPopUpWidgetFactor]);
const Graphics::Surface *arrow = surface(kWidgetArrow);
- Common::Rect arrowRect(r.right - 4 - arrow->w, r.top + 4, r.right - 4, r.top + 4 + arrow->h);
+
+ int yOff = r.height() / 2 - arrow->h;
+ if (yOff < 0)
+ yOff = 0;
+
+ Common::Rect arrowRect(r.right - 4 - arrow->w, r.top + yOff, r.right - 4, r.top + yOff + arrow->h);
arrowRect.clip(r);
drawSurface(arrowRect, arrow, false, false, (state == kStateDisabled) ? -30 : 256);
- arrowRect.top += arrow->h + 1;
- arrowRect.bottom += arrow->h + 1;
+ arrowRect.top += arrow->h;
+ arrowRect.bottom += arrow->h;
arrowRect.clip(r);
drawSurface(arrowRect, arrow, true, false, (state == kStateDisabled) ? -30 : 256);