Wolfgang Schwotzer wolfgang.schwotzer@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.