Module: wine Branch: master Commit: 682b03731cb8139f3e1b3e143c1841a03ee19e84 URL: http://source.winehq.org/git/wine.git/?a=commit;h=682b03731cb8139f3e1b3e143c...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Dec 1 20:30:16 2011 +0100
comctl32: Fix text wrapping in syslink when an item starts in the middle of a line.
---
dlls/comctl32/syslink.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c index 823c7ac..42fb987 100644 --- a/dlls/comctl32/syslink.c +++ b/dlls/comctl32/syslink.c @@ -606,7 +606,7 @@ static PDOC_ITEM SYSLINK_GetPrevLink (const SYSLINK_INFO *infoPtr, PDOC_ITEM Cur * SYSLINK_WrapLine * Tries to wrap a line. */ -static BOOL SYSLINK_WrapLine (LPWSTR Text, WCHAR BreakChar, int *LineLen, +static BOOL SYSLINK_WrapLine (LPWSTR Text, WCHAR BreakChar, int x, int *LineLen, int nFit, LPSIZE Extent) { int i; @@ -625,7 +625,7 @@ static BOOL SYSLINK_WrapLine (LPWSTR Text, WCHAR BreakChar, int *LineLen, { Extent->cx = 0; Extent->cy = 0; - i = max( nFit, 1 ); + if (x == SL_LEFTMARGIN) i = max( nFit, 1 ); } } *LineLen = i; @@ -722,7 +722,7 @@ static VOID SYSLINK_Render (const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect)
if(n != 0) { - Wrap = SYSLINK_WrapLine(tx, infoPtr->BreakChar, &LineLen, nFit, &szDim); + Wrap = SYSLINK_WrapLine(tx, infoPtr->BreakChar, x, &LineLen, nFit, &szDim);
if(LineLen == 0) {