mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Choose the correct icon size for Windows taskbar
This commit is contained in:
@@ -633,7 +633,8 @@ void Window::ShowDefinitionForSelection() {
|
||||
void Window::SetIcon(mate::Handle<NativeImage> icon) {
|
||||
#if defined(OS_WIN)
|
||||
static_cast<NativeWindowViews*>(window_.get())->SetIcon(
|
||||
icon->GetHICON(GetSystemMetrics(SM_CXSMICON)), icon->GetHICON(256));
|
||||
icon->GetHICON(GetSystemMetrics(SM_CXSMICON)),
|
||||
icon->GetHICON(GetSystemMetrics(SM_CXICON)));
|
||||
#elif defined(USE_X11)
|
||||
static_cast<NativeWindowViews*>(window_.get())->SetIcon(
|
||||
icon->image().AsImageSkia());
|
||||
|
||||
@@ -30,6 +30,7 @@ effects it is recommended to include at least followings sizes in the icon:
|
||||
|
||||
* 16x16
|
||||
* 32x32
|
||||
* 64x64
|
||||
* 256x256
|
||||
|
||||
## High Resolution Image
|
||||
|
||||
Reference in New Issue
Block a user