Commit 8ba9b5fc authored by Rein Klazes's avatar Rein Klazes Committed by Alexandre Julliard

Use button face color for the image mask when adding a bitmap to the

toolbar, not the color of the top left pixel of the image.
parent 16b44116
......@@ -2276,7 +2276,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
DeleteDC (hdcImage);
DeleteDC (hdcBitmap);
nIndex = ImageList_AddMasked (himlDef, hbmLoad, CLR_DEFAULT);
nIndex = ImageList_AddMasked (himlDef, hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad);
}
else if (lpAddBmp->hInst == HINST_COMMCTRL)
......@@ -2288,7 +2288,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
hbmLoad = LoadBitmapA (COMCTL32_hModule,
MAKEINTRESOURCEA(IDB_STD_SMALL));
nIndex = ImageList_AddMasked (himlDef,
hbmLoad, CLR_DEFAULT);
hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad);
break;
......@@ -2296,7 +2296,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
hbmLoad = LoadBitmapA (COMCTL32_hModule,
MAKEINTRESOURCEA(IDB_STD_LARGE));
nIndex = ImageList_AddMasked (himlDef,
hbmLoad, CLR_DEFAULT);
hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad);
break;
......@@ -2304,7 +2304,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
hbmLoad = LoadBitmapA (COMCTL32_hModule,
MAKEINTRESOURCEA(IDB_VIEW_SMALL));
nIndex = ImageList_AddMasked (himlDef,
hbmLoad, CLR_DEFAULT);
hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad);
break;
......@@ -2312,7 +2312,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
hbmLoad = LoadBitmapA (COMCTL32_hModule,
MAKEINTRESOURCEA(IDB_VIEW_LARGE));
nIndex = ImageList_AddMasked (himlDef,
hbmLoad, CLR_DEFAULT);
hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad);
break;
......@@ -2320,7 +2320,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
hbmLoad = LoadBitmapA (COMCTL32_hModule,
MAKEINTRESOURCEA(IDB_HIST_SMALL));
nIndex = ImageList_AddMasked (himlDef,
hbmLoad, CLR_DEFAULT);
hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad);
break;
......@@ -2328,7 +2328,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
hbmLoad = LoadBitmapA (COMCTL32_hModule,
MAKEINTRESOURCEA(IDB_HIST_LARGE));
nIndex = ImageList_AddMasked (himlDef,
hbmLoad, CLR_DEFAULT);
hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad);
break;
......@@ -2341,7 +2341,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
else
{
hbmLoad = LoadBitmapA (lpAddBmp->hInst, (LPSTR)lpAddBmp->nID);
nIndex = ImageList_AddMasked (himlDef, hbmLoad, CLR_DEFAULT);
nIndex = ImageList_AddMasked (himlDef, hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad);
}
......@@ -3890,7 +3890,7 @@ TOOLBAR_ReplaceBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
DeleteDC (hdcImage);
DeleteDC (hdcBitmap);
ImageList_AddMasked (himlDef, hbmLoad, CLR_DEFAULT);
ImageList_AddMasked (himlDef, hbmLoad, comctl32_color.clrBtnFace);
nNewBitmaps = ImageList_GetImageCount(himlDef);
DeleteObject (hbmLoad);
}
......
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