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>
This commit is contained in:
parent
d6654dbf2b
commit
60fad890db
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue