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
d778da2f
Commit
d778da2f
authored
Jul 25, 2000
by
Aric Stewart
Committed by
Alexandre Julliard
Jul 25, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent the attempt to draw invalid image indexes.
Provide the two pixel buffer between the image and the label.
parent
2e67f9bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
listview.c
dlls/comctl32/listview.c
+10
-7
No files found.
dlls/comctl32/listview.c
View file @
d778da2f
...
...
@@ -2157,6 +2157,8 @@ static VOID LISTVIEW_DrawItem(HWND hwnd, HDC hdc, INT nItem, RECT rcItem)
INT
nMixMode
;
DWORD
dwBkColor
;
DWORD
dwTextColor
;
/* buffer of two pixels between the icon and the label */
const
INT
ImageBuffer
=
2
;
TRACE
(
"(hwnd=%x, hdc=%x, nItem=%d)
\n
"
,
hwnd
,
hdc
,
nItem
);
...
...
@@ -2174,32 +2176,33 @@ static VOID LISTVIEW_DrawItem(HWND hwnd, HDC hdc, INT nItem, RECT rcItem)
if
(
infoPtr
->
himlState
!=
NULL
)
{
UINT
uStateImage
=
(
lvItem
.
state
&
LVIS_STATEIMAGEMASK
)
>>
12
;
if
(
uStateImage
!=
0
)
if
(
uStateImage
>
0
)
{
ImageList_Draw
(
infoPtr
->
himlState
,
uStateImage
-
1
,
hdc
,
rcItem
.
left
,
rcItem
.
top
,
ILD_NORMAL
);
}
rcItem
.
left
+=
infoPtr
->
iconSize
.
cx
;
rcItem
.
left
+=
ImageBuffer
+
infoPtr
->
iconSize
.
cx
;
}
/* small icons */
if
(
infoPtr
->
himlSmall
!=
NULL
)
{
if
((
lvItem
.
state
&
LVIS_SELECTED
)
&&
(
infoPtr
->
bFocus
!=
FALSE
))
if
((
lvItem
.
state
&
LVIS_SELECTED
)
&&
(
infoPtr
->
bFocus
!=
FALSE
)
&&
(
lvItem
.
iImage
>=
0
))
{
ImageList_SetBkColor
(
infoPtr
->
himlSmall
,
CLR_NONE
);
ImageList_Draw
(
infoPtr
->
himlSmall
,
lvItem
.
iImage
,
hdc
,
rcItem
.
left
,
rcItem
.
top
,
ILD_SELECTED
);
}
else
else
if
(
lvItem
.
iImage
>=
0
)
{
ImageList_SetBkColor
(
infoPtr
->
himlSmall
,
CLR_NONE
);
ImageList_Draw
(
infoPtr
->
himlSmall
,
lvItem
.
iImage
,
hdc
,
rcItem
.
left
,
rcItem
.
top
,
ILD_NORMAL
);
}
rcItem
.
left
+=
infoPtr
->
iconSize
.
cx
;
rcItem
.
left
+=
ImageBuffer
+
infoPtr
->
iconSize
.
cx
;
}
/* Don't bother painting item being edited */
...
...
@@ -2312,12 +2315,12 @@ bottom=%d)\n", hwnd, hdc, nItem, rcItem.left, rcItem.top, rcItem.right,
{
rcItem
.
top
+=
ICON_TOP_PADDING
;
nDrawPosX
+=
(
infoPtr
->
iconSpacing
.
cx
-
infoPtr
->
iconSize
.
cx
)
/
2
;
if
(
lvItem
.
state
&
LVIS_SELECTED
)
if
(
(
lvItem
.
state
&
LVIS_SELECTED
)
&&
(
lvItem
.
iImage
>=
0
)
)
{
ImageList_Draw
(
infoPtr
->
himlNormal
,
lvItem
.
iImage
,
hdc
,
nDrawPosX
,
rcItem
.
top
,
ILD_SELECTED
);
}
else
else
if
(
lvItem
.
iImage
>=
0
)
{
ImageList_Draw
(
infoPtr
->
himlNormal
,
lvItem
.
iImage
,
hdc
,
nDrawPosX
,
rcItem
.
top
,
ILD_NORMAL
);
...
...
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