From a9431edca2f5ed3a8e6753662822393755bc69e6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Apr 2006 18:50:07 +0000 Subject: - Fixed popup widget for --force-1x-overlay with new theme - adds support for highlightened popupwidgets svn-id: r22012 --- gui/ThemeNew.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gui/ThemeNew.cpp') 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); -- cgit v1.2.3