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:
parent
1f74c0a0d1
commit
3ad882ff24
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue