From f22ff403acdfc783340166716301972e3ecf7de5 Mon Sep 17 00:00:00 2001 From: Francis Beaudet Date: Fri, 3 Sep 1999 12:35:18 +0000 Subject: [PATCH] Fixed a little positioning bug with the checkbox. --- controls/button.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controls/button.c b/controls/button.c index 2536e05137f..f35eaf54549 100644 --- a/controls/button.c +++ b/controls/button.c @@ -681,7 +681,10 @@ static void CB_Paint( WND *wndPtr, HDC hDC, WORD action ) { HDC hMemDC = CreateCompatibleDC( hDC ); int x = 0, y = 0; - delta = (rbox.bottom - rbox.top - checkBoxHeight) >> 1; + delta = (rbox.bottom - rbox.top - checkBoxHeight) / 2; + + /* Check in case the client area is smaller than the checkbox bitmap */ + if (delta < 0) delta = 0; if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush ); else FillRect( hDC, &client, hBrush );