mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 13:01:40 +00:00
[WIN32SS][COMCTL32] Improve button text position (#2135)
Improve DrawText function especially DT_CALCRECT and DT_VCENTER. CORE-15478
This commit is contained in:
parent
7cc76d8afc
commit
e329e83857
1 changed files with 2 additions and 12 deletions
|
@ -1263,18 +1263,8 @@ INT WINAPI DrawTextExWorker( HDC hdc,
|
|||
if (flags & DT_SINGLELINE)
|
||||
{
|
||||
#ifdef __REACTOS__
|
||||
if (flags & DT_VCENTER)
|
||||
{
|
||||
if (flags & DT_CALCRECT)
|
||||
{
|
||||
if (rect->bottom - rect->top < size.cy / 2)
|
||||
y = rect->top + (invert_y ? size.cy : -size.cy) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
y = rect->top + (rect->bottom - rect->top + (invert_y ? size.cy : -size.cy)) / 2;
|
||||
}
|
||||
}
|
||||
if (flags & DT_VCENTER) y = rect->top +
|
||||
(rect->bottom - rect->top + (invert_y ? size.cy : -size.cy)) / 2;
|
||||
else if (flags & DT_BOTTOM)
|
||||
y = rect->bottom + (invert_y ? 0 : -size.cy);
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue