Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
734dc8f2
Commit
734dc8f2
authored
Apr 19, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Apr 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Use the imagelist to determine the icon size.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
524e316a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
iconcache.c
dlls/shell32/iconcache.c
+16
-4
No files found.
dlls/shell32/iconcache.c
View file @
734dc8f2
...
...
@@ -298,6 +298,17 @@ static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallI
LeaveCriticalSection
(
&
SHELL32_SicCS
);
return
ret
;
}
static
BOOL
get_imagelist_icon_size
(
int
list
,
SIZE
*
size
)
{
HIMAGELIST
image_list
;
if
(
list
<
SHIL_LARGE
||
list
>
SHIL_SMALL
)
return
FALSE
;
image_list
=
(
list
==
SHIL_LARGE
)
?
ShellBigIconList
:
ShellSmallIconList
;
return
ImageList_GetIconSize
(
image_list
,
&
size
->
cx
,
&
size
->
cy
);
}
/****************************************************************************
* SIC_LoadIcon [internal]
*
...
...
@@ -311,11 +322,12 @@ static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags)
HICON
hiconLargeShortcut
;
HICON
hiconSmallShortcut
;
int
ret
;
SIZE
size
;
PrivateExtractIconsW
(
sSourceFile
,
dwSourceIndex
,
GetSystemMetrics
(
SM_CXICON
),
GetSystemMetrics
(
SM_CYICON
)
,
&
hiconLarge
,
0
,
1
,
0
);
PrivateExtractIconsW
(
sSourceFile
,
dwSourceIndex
,
GetSystemMetrics
(
SM_CXSMICON
),
GetSystemMetrics
(
SM_CYSMICON
)
,
&
hiconSmall
,
0
,
1
,
0
);
get_imagelist_icon_size
(
SHIL_LARGE
,
&
size
);
PrivateExtractIconsW
(
sSourceFile
,
dwSourceIndex
,
size
.
cx
,
size
.
cy
,
&
hiconLarge
,
0
,
1
,
0
);
get_imagelist_icon_size
(
SHIL_SMALL
,
&
size
);
PrivateExtractIconsW
(
sSourceFile
,
dwSourceIndex
,
size
.
cx
,
size
.
cy
,
&
hiconSmall
,
0
,
1
,
0
);
if
(
!
hiconLarge
||
!
hiconSmall
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment