[WIN32SS][COMCTL32] Fix button text Y positioning (#766)

Fixes the vertical position of button text.
CORE-14906
This commit is contained in:
Katayama Hirofumi MZ 2018-09-10 00:37:37 +09:00 committed by Hermès BÉLUSCA - MAÏTO
parent 2d645f62fe
commit a244e4f6dd
2 changed files with 8 additions and 0 deletions

View file

@ -1273,7 +1273,11 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc)
{
case DT_TOP: r.top++; r.bottom++; break;
case DT_VCENTER: n = r.bottom - r.top;
#ifdef __REACTOS__
r.top = rc->top + ((rc->bottom - 1 - rc->top) - n) / 2;
#else
r.top = rc->top + ((rc->bottom - rc->top) - n) / 2;
#endif
r.bottom = r.top + n; break;
case DT_BOTTOM: n = r.bottom - r.top;
r.bottom = rc->bottom - 1;

View file

@ -832,7 +832,11 @@ static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc)
{
case DT_TOP: r.top++; r.bottom++; break;
case DT_VCENTER: n = r.bottom - r.top;
#ifdef __REACTOS__
r.top = rc->top + ((rc->bottom - 1 - rc->top) - n) / 2;
#else
r.top = rc->top + ((rc->bottom - rc->top) - n) / 2;
#endif
r.bottom = r.top + n; break;
case DT_BOTTOM: n = r.bottom - r.top;
r.bottom = rc->bottom - 1;