comdlg32: Use InflateRect() instead of open coding it.

Michael Stefaniuc mstefani at redhat.de
Fri Jul 1 03:43:35 CDT 2016


Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
 dlls/comdlg32/printdlg.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c
index a389e53..83335a9 100644
--- a/dlls/comdlg32/printdlg.c
+++ b/dlls/comdlg32/printdlg.c
@@ -3617,11 +3617,8 @@ PRINTDLG_PagePaintProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
         default_page_paint_hook(hWnd, WM_PSD_MARGINRECT, (WPARAM)hdc, (LPARAM)&rcMargin, data);
 
         /* give text a bit of a space from the frame */
-        rcMargin.left += 2;
-        rcMargin.top += 2;
-        rcMargin.right -= 2;
-        rcMargin.bottom -= 2;
-        
+        InflateRect(&rcMargin, -2, -2);
+
         /* if the space is too small then we make sure to not draw anything */
         rcMargin.left = min(rcMargin.left, rcMargin.right);
         rcMargin.top = min(rcMargin.top, rcMargin.bottom);
-- 
2.4.11



More information about the wine-patches mailing list