[BUG_FIXED] Make icons' background color of functionList and projectManager transparent.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1272 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2014-08-10 23:22:04 +00:00
parent fefa864ff5
commit b139d878e0
11 changed files with 12 additions and 12 deletions

View File

@ -429,7 +429,7 @@ void FunctionListPanel::notified(LPNMHDR notification)
BOOL FunctionListPanel::setTreeViewImageList(int root_id, int node_id, int leaf_id) BOOL FunctionListPanel::setTreeViewImageList(int root_id, int node_id, int leaf_id)
{ {
HBITMAP hbmp; HBITMAP hbmp;
COLORREF maskColour = RGB(192, 192, 192);
const int nbBitmaps = 3; const int nbBitmaps = 3;
// Creation of image list // Creation of image list
@ -440,19 +440,19 @@ BOOL FunctionListPanel::setTreeViewImageList(int root_id, int node_id, int leaf_
hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(root_id)); hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(root_id));
if (hbmp == NULL) if (hbmp == NULL)
return FALSE; return FALSE;
ImageList_Add(_hTreeViewImaLst, hbmp, (HBITMAP)NULL); ImageList_AddMasked(_hTreeViewImaLst, hbmp, maskColour);
DeleteObject(hbmp); DeleteObject(hbmp);
hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(node_id)); hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(node_id));
if (hbmp == NULL) if (hbmp == NULL)
return FALSE; return FALSE;
ImageList_Add(_hTreeViewImaLst, hbmp, (HBITMAP)NULL); ImageList_AddMasked(_hTreeViewImaLst, hbmp, maskColour);
DeleteObject(hbmp); DeleteObject(hbmp);
hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(leaf_id)); hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(leaf_id));
if (hbmp == NULL) if (hbmp == NULL)
return FALSE; return FALSE;
ImageList_Add(_hTreeViewImaLst, hbmp, (HBITMAP)NULL); ImageList_AddMasked(_hTreeViewImaLst, hbmp, maskColour);
DeleteObject(hbmp); DeleteObject(hbmp);
if (ImageList_GetImageCount(_hTreeViewImaLst) < nbBitmaps) if (ImageList_GetImageCount(_hTreeViewImaLst) < nbBitmaps)

View File

@ -257,7 +257,7 @@ void ProjectPanel::initMenus()
BOOL ProjectPanel::setImageList(int root_clean_id, int root_dirty_id, int project_id, int open_node_id, int closed_node_id, int leaf_id, int ivalid_leaf_id) BOOL ProjectPanel::setImageList(int root_clean_id, int root_dirty_id, int project_id, int open_node_id, int closed_node_id, int leaf_id, int ivalid_leaf_id)
{ {
HBITMAP hbmp; HBITMAP hbmp;
COLORREF maskColour = RGB(192, 192, 192);
const int nbBitmaps = 7; const int nbBitmaps = 7;
// Creation of image list // Creation of image list
@ -268,43 +268,43 @@ BOOL ProjectPanel::setImageList(int root_clean_id, int root_dirty_id, int projec
hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(root_clean_id)); hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(root_clean_id));
if (hbmp == NULL) if (hbmp == NULL)
return FALSE; return FALSE;
ImageList_Add(_hImaLst, hbmp, (HBITMAP)NULL); ImageList_AddMasked(_hImaLst, hbmp, maskColour);
DeleteObject(hbmp); DeleteObject(hbmp);
hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(root_dirty_id)); hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(root_dirty_id));
if (hbmp == NULL) if (hbmp == NULL)
return FALSE; return FALSE;
ImageList_Add(_hImaLst, hbmp, (HBITMAP)NULL); ImageList_AddMasked(_hImaLst, hbmp, maskColour);
DeleteObject(hbmp); DeleteObject(hbmp);
hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(project_id)); hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(project_id));
if (hbmp == NULL) if (hbmp == NULL)
return FALSE; return FALSE;
ImageList_Add(_hImaLst, hbmp, (HBITMAP)NULL); ImageList_AddMasked(_hImaLst, hbmp, maskColour);
DeleteObject(hbmp); DeleteObject(hbmp);
hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(open_node_id)); hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(open_node_id));
if (hbmp == NULL) if (hbmp == NULL)
return FALSE; return FALSE;
ImageList_Add(_hImaLst, hbmp, (HBITMAP)NULL); ImageList_AddMasked(_hImaLst, hbmp, maskColour);
DeleteObject(hbmp); DeleteObject(hbmp);
hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(closed_node_id)); hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(closed_node_id));
if (hbmp == NULL) if (hbmp == NULL)
return FALSE; return FALSE;
ImageList_Add(_hImaLst, hbmp, (HBITMAP)NULL); ImageList_AddMasked(_hImaLst, hbmp, maskColour);
DeleteObject(hbmp); DeleteObject(hbmp);
hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(leaf_id)); hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(leaf_id));
if (hbmp == NULL) if (hbmp == NULL)
return FALSE; return FALSE;
ImageList_Add(_hImaLst, hbmp, (HBITMAP)NULL); ImageList_AddMasked(_hImaLst, hbmp, maskColour);
DeleteObject(hbmp); DeleteObject(hbmp);
hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(ivalid_leaf_id)); hbmp = LoadBitmap(_hInst, MAKEINTRESOURCE(ivalid_leaf_id));
if (hbmp == NULL) if (hbmp == NULL)
return FALSE; return FALSE;
ImageList_Add(_hImaLst, hbmp, (HBITMAP)NULL); ImageList_AddMasked(_hImaLst, hbmp, maskColour);
DeleteObject(hbmp); DeleteObject(hbmp);
if (ImageList_GetImageCount(_hImaLst) < nbBitmaps) if (ImageList_GetImageCount(_hImaLst) < nbBitmaps)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 822 B