Module: wine Branch: master Commit: 84ce2922179591e3aa6b2667d8945ec6f024a874 URL: https://source.winehq.org/git/wine.git/?a=commit;h=84ce2922179591e3aa6b2667d...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Wed Apr 25 21:17:22 2018 +0800
comctl32: 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/comctl32/button.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 1feb07a..507820c 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -1150,14 +1150,14 @@ static void CB_Paint( const BUTTON_INFO *infoPtr, 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 {