From: James Tabor Date: Wed, 31 Aug 2016 16:20:57 +0000 (+0000) Subject: [NtGDI] X-Git-Tag: backups/sndblst@72664~139 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=8496d0aa2e8788a607b8360c773b47b944561093 [NtGDI] - Patch by Sebastian Gasiorek : Fix incorrect placement of the text in the Tab buttons. Implement TA_UPDATECP. See CORE-1578 and CORE-11415. svn path=/trunk/; revision=72521 --- diff --git a/reactos/win32ss/gdi/ntgdi/freetype.c b/reactos/win32ss/gdi/ntgdi/freetype.c index 210cd1742e3..bc33b6934a3 100644 --- a/reactos/win32ss/gdi/ntgdi/freetype.c +++ b/reactos/win32ss/gdi/ntgdi/freetype.c @@ -3408,9 +3408,15 @@ GreExtTextOutW( IntLPtoDP(dc, (POINT *)lprc, 2); } - Start.x = XStart; - Start.y = YStart; - IntLPtoDP(dc, &Start, 1); + if(pdcattr->lTextAlign & TA_UPDATECP) + { + Start.x = pdcattr->ptlCurrent.x; + Start.y = pdcattr->ptlCurrent.y; + } else { + Start.x = XStart; + Start.y = YStart; + IntLPtoDP(dc, &Start, 1); + } RealXStart = ((LONGLONG)Start.x + dc->ptlDCOrig.x) << 6; YStart = Start.y + dc->ptlDCOrig.y; @@ -3842,6 +3848,11 @@ GreExtTextOutW( String++; } + + if (pdcattr->lTextAlign & TA_UPDATECP) { + pdcattr->ptlCurrent.x = DestRect.right - dc->ptlDCOrig.x; + } + IntUnLockFreeType; DC_vFinishBlit(dc, NULL) ;