Zhiyi Zhang : comctl32: Fix checkbox wrong box alignment with BS_VCENTER.
Alexandre Julliard
julliard at winehq.org
Thu Apr 26 16:18:18 CDT 2018
Module: wine
Branch: master
Commit: 84ce2922179591e3aa6b2667d8945ec6f024a874
URL: https://source.winehq.org/git/wine.git/?a=commit;h=84ce2922179591e3aa6b2667d8945ec6f024a874
Author: Zhiyi Zhang <zzhang at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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 {
More information about the wine-cvs
mailing list