[COMCTL32][USER32] Fix radio button regression (#2146)

PR #2135 (e329e83) caused radiobutton regression. This PR will fix it.
- Clear DT_BOTTOM | DT_VCENTER flags upon calculating the button text height.
CORE-16552
This commit is contained in:
Katayama Hirofumi MZ 2019-12-10 11:07:56 +09:00 committed by GitHub
parent 0785633649
commit 2d4d3f5fce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -1211,7 +1211,11 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc)
}
if ((hFont = infoPtr->font)) hPrevFont = SelectObject( hdc, hFont );
#ifdef __REACTOS__
DrawTextW(hdc, text, -1, &r, ((dtStyle | DT_CALCRECT) & ~(DT_VCENTER | DT_BOTTOM)));
#else
DrawTextW(hdc, text, -1, &r, dtStyle | DT_CALCRECT);
#endif
if (hPrevFont) SelectObject( hdc, hPrevFont );
heap_free( text );
#ifdef __REACTOS__

View file

@ -773,7 +773,11 @@ static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc)
}
if ((hFont = get_button_font( hwnd ))) hPrevFont = SelectObject( hdc, hFont );
#ifdef __REACTOS__
DrawTextW(hdc, text, -1, &r, ((dtStyle | DT_CALCRECT) & ~(DT_VCENTER | DT_BOTTOM)));
#else
DrawTextW(hdc, text, -1, &r, dtStyle | DT_CALCRECT);
#endif
if (hPrevFont) SelectObject( hdc, hPrevFont );
HeapFree( GetProcessHeap(), 0, text );
#ifdef __REACTOS__