mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[WIN32SS][COMCTL32] Fix button text Y positioning (#766)
Fixes the vertical position of button text. CORE-14906
This commit is contained in:
parent
2d645f62fe
commit
a244e4f6dd
2 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue