Commit 60fad890 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

user32: Fix checkbox wrong box alignment with BS_VCENTER.

parent d6654dbf
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment