Use LoadIconMetric to load correct icon
This commit is contained in:
parent
9e26e5c121
commit
0059e7bcf9
1 changed files with 7 additions and 3 deletions
|
@ -4,6 +4,10 @@
|
|||
|
||||
#include "atom/common/api/atom_api_native_image.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -155,9 +159,9 @@ base::win::ScopedHICON ReadICOFromPath(const base::FilePath& path) {
|
|||
}
|
||||
|
||||
// Load the icon from file.
|
||||
return base::win::ScopedHICON(static_cast<HICON>(
|
||||
LoadImage(NULL, image_path.value().c_str(), IMAGE_ICON, 0, 0,
|
||||
LR_DEFAULTSIZE | LR_LOADFROMFILE)));
|
||||
HICON icon = NULL;
|
||||
LoadIconMetric(NULL, image_path.value().c_str(), LIM_SMALL, &icon);
|
||||
return base::win::ScopedHICON(icon);
|
||||
}
|
||||
|
||||
void ReadImageSkiaFromICO(gfx::ImageSkia* image, HICON icon) {
|
||||
|
|
Loading…
Reference in a new issue