(svn r27863) [1.7] -Backport from trunk:

- Fix: Black remap did nothing in 8bpp-simple blitter (r27837)
- Fix: Misaligned resize icon due to widget bounds being inclusive (r27831)
- Fix: Update viewport sign dimensions when changing GUI zoom level (r27827, r27819)
- Fix: Vehicle viewport is not user scrollable so flag window as such (r27823)
- Fix: Allow dropdown to be drawn above origin widget even with scrollbar (r27820)
- Fix: 32bpp-anim blitters assumed that pitch and width of the screen were equal [FS#6545] (r27796)
- Fix: Chat text background overflowed due to missing padding [FS#6526] (r27794)
This commit is contained in:
frosch
2017-05-03 20:09:51 +00:00
committed by Sergii Pylypenko
parent 2b933a1b3b
commit 8f58cc6dac
9 changed files with 68 additions and 43 deletions

View File

@@ -474,13 +474,14 @@ static inline void DrawFrame(const Rect &r, Colours colour, StringID str)
static inline void DrawResizeBox(const Rect &r, Colours colour, bool at_left, bool clicked)
{
DrawFrameRect(r.left, r.top, r.right, r.bottom, colour, (clicked) ? FR_LOWERED : FR_NONE);
Dimension d = GetSpriteSize(at_left ? SPR_WINDOW_RESIZE_LEFT : SPR_WINDOW_RESIZE_RIGHT);
if (at_left) {
DrawSprite(SPR_WINDOW_RESIZE_LEFT, PAL_NONE, r.left + WD_RESIZEBOX_LEFT + clicked,
r.bottom - WD_RESIZEBOX_BOTTOM - d.height + clicked);
Dimension d = GetSpriteSize(SPR_WINDOW_RESIZE_LEFT);
DrawSprite(SPR_WINDOW_RESIZE_LEFT, PAL_NONE, r.left + WD_RESIZEBOX_RIGHT + clicked,
r.bottom + 1 - WD_RESIZEBOX_BOTTOM - d.height + clicked);
} else {
DrawSprite(SPR_WINDOW_RESIZE_RIGHT, PAL_NONE, r.right - WD_RESIZEBOX_RIGHT - d.width + clicked,
r.bottom - WD_RESIZEBOX_BOTTOM - d.height + clicked);
Dimension d = GetSpriteSize(SPR_WINDOW_RESIZE_RIGHT);
DrawSprite(SPR_WINDOW_RESIZE_RIGHT, PAL_NONE, r.right + 1 - WD_RESIZEBOX_RIGHT - d.width + clicked,
r.bottom + 1 - WD_RESIZEBOX_BOTTOM - d.height + clicked);
}
}