Misplacement of checkboxes with empty label fixed.
This commit is contained in:
parent
1ab01450fd
commit
c2d38ceee8
|
@ -914,8 +914,13 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
|
|||
client = rtext;
|
||||
dtFlags = BUTTON_CalcLabelRect(hwnd, hDC, &rtext);
|
||||
|
||||
/* Only adjust rbox when rtext is valid */
|
||||
if (dtFlags != (UINT)-1L)
|
||||
{
|
||||
rbox.top = rtext.top;
|
||||
rbox.bottom = rtext.bottom;
|
||||
}
|
||||
|
||||
/* Draw the check-box bitmap */
|
||||
if (action == ODA_DRAWENTIRE || action == ODA_SELECT)
|
||||
{
|
||||
|
@ -946,7 +951,7 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
|
|||
rbox.top = rbox.bottom - checkBoxHeight;
|
||||
} else {
|
||||
rbox.bottom += -delta/2 + 1;
|
||||
rbox.top = rbox.bottom -= checkBoxHeight;
|
||||
rbox.top = rbox.bottom - checkBoxHeight;
|
||||
}
|
||||
} else { /* Default */
|
||||
if (delta > 0) {
|
||||
|
|
Loading…
Reference in New Issue