Commit bfb49ad0 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

comctl32/toolbar: Add support for TBCDRF_NOBACKGROUND.

Tested manually on XP, Win 7 and Win 10. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53049Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com>
parent d2a7b967
......@@ -1062,20 +1062,23 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
if (theme)
{
int partId = drawSepDropDownArrow ? TP_SPLITBUTTON : TP_BUTTON;
int stateId = TS_NORMAL;
if (tbcd.nmcd.uItemState & CDIS_DISABLED)
stateId = TS_DISABLED;
else if (tbcd.nmcd.uItemState & CDIS_SELECTED)
stateId = TS_PRESSED;
else if (tbcd.nmcd.uItemState & CDIS_CHECKED)
stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_CHECKED;
else if ((tbcd.nmcd.uItemState & CDIS_HOT)
|| (drawSepDropDownArrow && btnPtr->bDropDownPressed))
stateId = TS_HOT;
DrawThemeBackground (theme, hdc, partId, stateId, &rc, NULL);
if (!(dwItemCDFlag & TBCDRF_NOBACKGROUND))
{
int partId = drawSepDropDownArrow ? TP_SPLITBUTTON : TP_BUTTON;
int stateId = TS_NORMAL;
if (tbcd.nmcd.uItemState & CDIS_DISABLED)
stateId = TS_DISABLED;
else if (tbcd.nmcd.uItemState & CDIS_SELECTED)
stateId = TS_PRESSED;
else if (tbcd.nmcd.uItemState & CDIS_CHECKED)
stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_CHECKED;
else if ((tbcd.nmcd.uItemState & CDIS_HOT)
|| (drawSepDropDownArrow && btnPtr->bDropDownPressed))
stateId = TS_HOT;
DrawThemeBackground(theme, hdc, partId, stateId, &rc, NULL);
}
}
else
TOOLBAR_DrawFrame(infoPtr, &tbcd, &rc, dwItemCDFlag);
......
......@@ -1380,7 +1380,7 @@ typedef struct _NMTBCUSTOMDRAW
#define TBCDRF_NOETCHEDEFFECT 0x00100000 /* No etched effect for */
/* disabled items */
#define TBCDRF_BLENDICON 0x00200000 /* ILD_BLEND50 on the icon image */
#define TBCDRF_NOBACKGROUND 0x00400000 /* ILD_BLEND50 on the icon image */
#define TBCDRF_NOBACKGROUND 0x00400000 /* Don't draw button background */
#define TBCDRF_USECDCOLORS 0x00800000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment