mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
When drawing disabled buttons, use DrawText 2 times instead of using DrawState, which creates a mono bitmap first and that looks ugly with freetype. This makes the disabled buttons look as nice as the disabled menus.
svn path=/trunk/; revision=32934
This commit is contained in:
parent
c7ae31aabf
commit
1533c2379d
1 changed files with 16 additions and 2 deletions
|
@ -826,8 +826,22 @@ static void BUTTON_DrawLabel(HWND hwnd, HDC hdc, UINT dtFlags, RECT *rc)
|
|||
return;
|
||||
}
|
||||
|
||||
DrawStateW(hdc, hbr, lpOutputProc, lp, wp, rc->left, rc->top,
|
||||
rc->right - rc->left, rc->bottom - rc->top, flags);
|
||||
/* ROS Hack to make font look less ugly */
|
||||
if ( ((style & (BS_ICON|BS_BITMAP)) == BS_TEXT) &&
|
||||
(flags & DSS_DISABLED) )
|
||||
{
|
||||
++rc->left; ++rc->top; ++rc->right; ++rc->bottom;
|
||||
SetTextColor(hdc, GetSysColor(COLOR_3DHILIGHT));
|
||||
DrawTextW(hdc, (LPCWSTR)lp, -1, rc, (UINT)wp);
|
||||
--rc->left; --rc->top; --rc->right; --rc->bottom;
|
||||
SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
|
||||
DrawTextW(hdc, (LPCWSTR)lp, -1, rc, (UINT)wp);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawStateW(hdc, hbr, lpOutputProc, lp, wp, rc->left, rc->top,
|
||||
rc->right - rc->left, rc->bottom - rc->top, flags);
|
||||
}
|
||||
HeapFree( GetProcessHeap(), 0, text );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue