Michael Stefaniuc : user32: Use InflateRect() instead of open coding it.
Alexandre Julliard
julliard at winehq.org
Mon Jul 4 09:54:39 CDT 2016
Module: wine
Branch: master
Commit: 62c3bce8476561f0f7922039e84af0a9b72ccded
URL: http://source.winehq.org/git/wine.git/?a=commit;h=62c3bce8476561f0f7922039e84af0a9b72ccded
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Fri Jul 1 10:44:15 2016 +0200
user32: Use InflateRect() instead of open coding it.
Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/uitools.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/dlls/user32/uitools.c b/dlls/user32/uitools.c
index 9a0fff9..fa2e826 100644
--- a/dlls/user32/uitools.c
+++ b/dlls/user32/uitools.c
@@ -706,12 +706,7 @@ static BOOL UITOOLS95_DFC_ButtonPush(HDC dc, LPRECT r, UINT uFlags)
/* Adjust rectangle if asked */
if(uFlags & DFCS_ADJUSTRECT)
- {
- r->left += 2;
- r->right -= 2;
- r->top += 2;
- r->bottom -= 2;
- }
+ InflateRect(r, -2, -2);
return TRUE;
}
@@ -832,11 +827,7 @@ static BOOL UITOOLS95_DFC_ButtonRadio(HDC dc, LPRECT r, UINT uFlags)
SelectObject(dc, GetSysColorBrush(COLOR_BTNSHADOW));
Pie(dc, myr.left, myr.top, myr.right+1, myr.bottom+1, myr.right+1, myr.top, myr.left-1, myr.bottom);
- myr.left += BorderShrink;
- myr.right -= BorderShrink;
- myr.top += BorderShrink;
- myr.bottom -= BorderShrink;
-
+ InflateRect(&myr, -BorderShrink, -BorderShrink);
SelectObject(dc, SYSCOLOR_GetPen(COLOR_3DLIGHT));
SelectObject(dc, GetSysColorBrush(COLOR_3DLIGHT));
Pie(dc, myr.left, myr.top, myr.right+1, myr.bottom+1, myr.left-1, myr.bottom, myr.right+1, myr.top);
More information about the wine-cvs
mailing list