summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2012-10-08 21:27:21 +0000
committerplanetmaker <planetmaker@openttd.org>2012-10-08 21:27:21 +0000
commit78eb17637b42f32884d4e901c1d5cf8dc47e760c (patch)
treefe06edc2e12b468e429384f4c93424895874157a
parent738fca37bf9f4d1696e2eb6478d2f16027673b6e (diff)
downloadopenttd-78eb17637b42f32884d4e901c1d5cf8dc47e760c.tar.xz
(svn r24577) -Fix [FS#5324]: Draw the window resize sprite bottom-aligned (sbr)
-rw-r--r--src/widget.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index d7c9e1f16..2b932f9a1 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -480,9 +480,11 @@ static inline void DrawResizeBox(const Rect &r, Colours colour, bool at_left, bo
{
DrawFrameRect(r.left, r.top, r.right, r.bottom, colour, (clicked) ? FR_LOWERED : FR_NONE);
if (at_left) {
- DrawSprite(SPR_WINDOW_RESIZE_LEFT, PAL_NONE, r.left + WD_RESIZEBOX_RIGHT + clicked, r.top + WD_RESIZEBOX_TOP + clicked);
+ DrawSprite(SPR_WINDOW_RESIZE_LEFT, PAL_NONE, r.left + WD_RESIZEBOX_RIGHT + clicked,
+ r.bottom - WD_RESIZEBOX_BOTTOM - GetSpriteSize(SPR_WINDOW_RESIZE_LEFT).height + clicked);
} else {
- DrawSprite(SPR_WINDOW_RESIZE_RIGHT, PAL_NONE, r.left + WD_RESIZEBOX_LEFT + clicked, r.top + WD_RESIZEBOX_TOP + clicked);
+ DrawSprite(SPR_WINDOW_RESIZE_RIGHT, PAL_NONE, r.left + WD_RESIZEBOX_LEFT + clicked,
+ r.bottom - WD_RESIZEBOX_BOTTOM - GetSpriteSize(SPR_WINDOW_RESIZE_RIGHT).height + clicked);
}
}