Module: wine Branch: master Commit: 60fad890db3c9c80b0792eaa5b195ebbeb631d34 URL: https://source.winehq.org/git/wine.git/?a=commit;h=60fad890db3c9c80b0792eaa5...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Fri Apr 27 11:38:05 2018 +0800
user32: Fix checkbox wrong box alignment with BS_VCENTER.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/button.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/button.c b/dlls/user32/button.c index adfb6a9..7684e7f 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -902,14 +902,14 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action ) /* rbox must have the correct height */ delta = rbox.bottom - rbox.top - checkBoxHeight; - if (style & BS_TOP) { + if ((style & BS_VCENTER) == BS_TOP) { if (delta > 0) { rbox.bottom = rbox.top + checkBoxHeight; } else { rbox.top -= -delta/2 + 1; rbox.bottom = rbox.top + checkBoxHeight; } - } else if (style & BS_BOTTOM) { + } else if ((style & BS_VCENTER) == BS_BOTTOM) { if (delta > 0) { rbox.top = rbox.bottom - checkBoxHeight; } else {