From 64a46c69d1c9d338febfd595db50110e04db2161 Mon Sep 17 00:00:00 2001 From: pelya Date: Sun, 12 Apr 2015 22:31:43 +0300 Subject: [PATCH] Centered close box sprite --- src/widget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widget.cpp b/src/widget.cpp index 980e639a4a..3018a4898d 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -489,7 +489,8 @@ static inline void DrawResizeBox(const Rect &r, Colours colour, bool at_left, bo static inline void DrawCloseBox(const Rect &r, Colours colour) { if (colour != COLOUR_WHITE) DrawFrameRect(r.left, r.top, r.right, r.bottom, colour, FR_NONE); - DrawSprite(SPR_CLOSEBOX, (colour != COLOUR_WHITE ? TC_BLACK : TC_SILVER) | (1 << PALETTE_TEXT_RECOLOUR), r.left + WD_CLOSEBOX_LEFT, r.top + WD_CLOSEBOX_TOP); + DrawSpriteCenteredInRect(SPR_CLOSEBOX, (colour != COLOUR_WHITE ? TC_BLACK : TC_SILVER) | (1 << PALETTE_TEXT_RECOLOUR), + r.left + WD_CLOSEBOX_LEFT * 2, r.top + WD_CLOSEBOX_TOP * 2, r.right, r.bottom); } /**