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

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2016-07-01 10:43:35 +02:00 committed by Alexandre Julliard
parent 1f74c0a0d1
commit 3ad882ff24
1 changed files with 2 additions and 5 deletions

View File

@ -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); default_page_paint_hook(hWnd, WM_PSD_MARGINRECT, (WPARAM)hdc, (LPARAM)&rcMargin, data);
/* give text a bit of a space from the frame */ /* give text a bit of a space from the frame */
rcMargin.left += 2; InflateRect(&rcMargin, -2, -2);
rcMargin.top += 2;
rcMargin.right -= 2;
rcMargin.bottom -= 2;
/* if the space is too small then we make sure to not draw anything */ /* if the space is too small then we make sure to not draw anything */
rcMargin.left = min(rcMargin.left, rcMargin.right); rcMargin.left = min(rcMargin.left, rcMargin.right);
rcMargin.top = min(rcMargin.top, rcMargin.bottom); rcMargin.top = min(rcMargin.top, rcMargin.bottom);