user32: Use InflateRect() too when stretching the RECT in just one axis.

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-04 09:47:27 +02:00 committed by Alexandre Julliard
parent 29abc7f172
commit 488562904f
1 changed files with 3 additions and 8 deletions

View File

@ -2376,14 +2376,9 @@ static void EDIT_SetRectNP(EDITSTATE *es, const RECT *rc)
else if (es->style & WS_BORDER) {
bw = GetSystemMetrics(SM_CXBORDER) + 1;
bh = GetSystemMetrics(SM_CYBORDER) + 1;
es->format_rect.left += bw;
es->format_rect.right -= bw;
if (es->format_rect.bottom - es->format_rect.top
>= es->line_height + 2 * bh)
{
es->format_rect.top += bh;
es->format_rect.bottom -= bh;
}
InflateRect(&es->format_rect, -bw, 0);
if (es->format_rect.bottom - es->format_rect.top >= es->line_height + 2 * bh)
InflateRect(&es->format_rect, 0, -bh);
}
es->format_rect.left += es->left_margin;