Re: user32: Right text placement (Bugfix for #22109)
8 Sep
2010
8 Sep
'10
5:10 p.m.
Wolfgang Schwotzer <wolfgang.schwotzer(a)gmx.net> writes:
Much thanks to Konstantin Kondratyuk. He is the brain behind this bugfix.
--- a/dlls/user32/text.c 2010-06-01 18:14:04.000000000 +0200 +++ b/dlls/user32/text.c 2010-06-01 18:15:37.000000000 +0200 @@ -954,8 +954,12 @@
if (flags & DT_SINGLELINE) { - if (flags & DT_VCENTER) y = rect->top + - (rect->bottom - rect->top) / 2 - size.cy / 2; + if (flags & DT_VCENTER) + { + int sign = 1; + if (rect->top < 0 && rect->bottom < 0) sign = -1; + y = rect->top + (rect->bottom - rect->top) / 2 - sign * size.cy / 2;
This doesn't make sense, the sign should depend on the viewport mappings, not on the position being negative. -- Alexandre Julliard julliard(a)winehq.org
5578
Age (days ago)
5578
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard