[2/2] richedit: Fixed centering and right align with word wrap disabled. (Fixes Bug 15352)
dylan.ah.smith at gmail.com
Fri Oct 10 16:50:44 CDT 2008
Previously the centering and right alignment was done using based on an
available width which was set to the largest possible integer when word
wrapping is disabled. This caused centered and right aligned text to be
drawn with an extremely large x value when word wrap was disabled.
This patch fixes the issue by calculating the same available width for
word wrap and without word wrap, then using a seperate variable to
indicating whether the line can wrap. This allows the non-wrapped text
to be aligned to the visible window when scrolled to the left. If the
text is larger than this smaller available width, then the text will
appear left aligned.
This behaviour is consistent with native msftedit.dll, but not
completely consistent with riched20.dll which left aligns centered or
right aligned text when word wrap is disabled using EM_SETTARGETDEVICE.
This should be acceptable since riched20.dll already conforms to
dlls/riched20/editstr.h | 2 +-
dlls/riched20/wrap.c | 14 ++++++++------
2 files changed, 9 insertions(+), 7 deletions(-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the wine-patches