[COMCTL32] -Buttons with the BS_PUSHLIKE style are drawn as if they were BS_PUSHBUTTON. Fixes the appearance of buttons in the advanced appearance dialog.

svn path=/trunk/; revision=74120
This commit is contained in:
Giannis Adamopoulos 2017-03-06 21:57:10 +00:00
parent f606ee89dd
commit f7b5561d60

View file

@ -335,13 +335,19 @@ BOOL BUTTON_PaintWithTheme(HTHEME theme, HWND hwnd, HDC hParamDC, LPARAM prfFlag
{
DWORD dwStyle;
DWORD dwStyleEx;
DWORD type;
UINT dtFlags;
int state;
ButtonState drawState;
pfThemedPaint paint;
dwStyle = GetWindowLongW(hwnd, GWL_STYLE);
paint = btnThemedPaintFunc[ dwStyle & BUTTON_TYPE ];
type = dwStyle & BUTTON_TYPE;
if (type != BS_PUSHBUTTON && type != BS_DEFPUSHBUTTON && (dwStyle & BS_PUSHLIKE))
type = BS_PUSHBUTTON;
paint = btnThemedPaintFunc[type];
if (!paint)
return FALSE;
@ -361,7 +367,7 @@ BOOL BUTTON_PaintWithTheme(HTHEME theme, HWND hwnd, HDC hParamDC, LPARAM prfFlag
}
else drawState = STATE_DISABLED;
if (drawState == STATE_NORMAL && (dwStyle & BUTTON_TYPE) == BS_DEFPUSHBUTTON)
if (drawState == STATE_NORMAL && type == BS_DEFPUSHBUTTON)
{
drawState = STATE_DEFAULTED;
}