[PATCH 5/5] user32: Respect right margin in DrawTextExW().
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> --- dlls/user32/text.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/user32/text.c b/dlls/user32/text.c index 34e035607b..4ba8ed43fb 100644 --- a/dlls/user32/text.c +++ b/dlls/user32/text.c @@ -1017,9 +1017,10 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count, last_line = !(flags & DT_NOCLIP) && y + ((flags & DT_EDITCONTROL) ? 2*lh-1 : lh) > rect->bottom; strPtr = TEXT_NextLineW(hdc, strPtr, &count, lines_ptr + used_buffer, &len, width, flags, &size, last_line, &p_retstr, tabwidth, &prefix_offset, &ellip); - if (flags & DT_CENTER) x = (rect->left + rect->right - - size.cx) / 2; - else if (flags & DT_RIGHT) x = rect->right - size.cx; + if (flags & DT_CENTER) + x = (rect->left + lmargin + rect->right - rmargin - size.cx) / 2; + else if (flags & DT_RIGHT) + x = rect->right - size.cx - rmargin; lines_info_ptr[used_lines].length = len; lines_info_ptr[used_lines].x = x; -- 2.17.0
participants (1)
-
Zhiyi Zhang