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
23dd4641
Commit
23dd4641
authored
Dec 10, 2007
by
Thomas Weidenmueller
Committed by
Alexandre Julliard
Dec 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix painting bug in listview control.
parent
a526ad6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
listview.c
dlls/comctl32/listview.c
+19
-14
No files found.
dlls/comctl32/listview.c
View file @
23dd4641
...
...
@@ -944,7 +944,7 @@ static inline DWORD notify_customdraw (const LISTVIEW_INFO *infoPtr, DWORD dwDra
return
result
;
}
static
void
prepaint_setup
(
const
LISTVIEW_INFO
*
infoPtr
,
HDC
hdc
,
NMLVCUSTOMDRAW
*
lpnmlvcd
)
static
void
prepaint_setup
(
const
LISTVIEW_INFO
*
infoPtr
,
HDC
hdc
,
NMLVCUSTOMDRAW
*
lpnmlvcd
,
BOOL
SubItem
)
{
if
(
lpnmlvcd
->
clrTextBk
==
CLR_DEFAULT
)
lpnmlvcd
->
clrTextBk
=
comctl32_color
.
clrWindow
;
...
...
@@ -952,18 +952,21 @@ static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRA
lpnmlvcd
->
clrText
=
comctl32_color
.
clrWindowText
;
/* apprently, for selected items, we have to override the returned values */
if
(
lpnmlvcd
->
nmcd
.
uItemState
&
CDIS_SELECTED
)
if
(
!
SubItem
)
{
if
(
infoPtr
->
bFocus
)
{
lpnmlvcd
->
clrTextBk
=
comctl32_color
.
clrHighlight
;
lpnmlvcd
->
clrText
=
comctl32_color
.
clrHighlightText
;
if
(
lpnmlvcd
->
nmcd
.
uItemState
&
CDIS_SELECTED
)
{
if
(
infoPtr
->
bFocus
)
{
lpnmlvcd
->
clrTextBk
=
comctl32_color
.
clrHighlight
;
lpnmlvcd
->
clrText
=
comctl32_color
.
clrHighlightText
;
}
else
if
(
infoPtr
->
dwStyle
&
LVS_SHOWSELALWAYS
)
{
lpnmlvcd
->
clrTextBk
=
comctl32_color
.
clr3dFace
;
lpnmlvcd
->
clrText
=
comctl32_color
.
clrBtnText
;
}
}
else
if
(
infoPtr
->
dwStyle
&
LVS_SHOWSELALWAYS
)
{
lpnmlvcd
->
clrTextBk
=
comctl32_color
.
clr3dFace
;
lpnmlvcd
->
clrText
=
comctl32_color
.
clrBtnText
;
}
}
/* Set the text attributes */
...
...
@@ -3787,7 +3790,9 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS
if
(
cdsubitemmode
&
CDRF_SKIPDEFAULT
)
goto
postpaint
;
}
if
(
nSubItem
==
0
||
(
cdmode
&
CDRF_NOTIFYITEMDRAW
))
prepaint_setup
(
infoPtr
,
hdc
,
&
nmlvcd
);
prepaint_setup
(
infoPtr
,
hdc
,
&
nmlvcd
,
FALSE
);
else
if
((
infoPtr
->
dwLvExStyle
&
LVS_EX_FULLROWSELECT
)
==
FALSE
)
prepaint_setup
(
infoPtr
,
hdc
,
&
nmlvcd
,
TRUE
);
/* in full row select, subitems, will just use main item's colors */
if
(
nSubItem
&&
uView
==
LVS_REPORT
&&
(
infoPtr
->
dwLvExStyle
&
LVS_EX_FULLROWSELECT
))
...
...
@@ -3930,7 +3935,7 @@ static void LISTVIEW_RefreshOwnerDraw(const LISTVIEW_INFO *infoPtr, ITERATOR *i,
if
(
!
(
cditemmode
&
CDRF_SKIPDEFAULT
))
{
prepaint_setup
(
infoPtr
,
hdc
,
&
nmlvcd
);
prepaint_setup
(
infoPtr
,
hdc
,
&
nmlvcd
,
FALSE
);
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_DRAWITEM
,
dis
.
CtlID
,
(
LPARAM
)
&
dis
);
}
...
...
@@ -4118,7 +4123,7 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcEra
customdraw_fill
(
&
nmlvcd
,
infoPtr
,
hdc
,
&
rcClient
,
0
);
cdmode
=
notify_customdraw
(
infoPtr
,
CDDS_PREPAINT
,
&
nmlvcd
);
if
(
cdmode
&
CDRF_SKIPDEFAULT
)
goto
enddraw
;
prepaint_setup
(
infoPtr
,
hdc
,
&
nmlvcd
);
prepaint_setup
(
infoPtr
,
hdc
,
&
nmlvcd
,
FALSE
);
/* Use these colors to draw the items */
infoPtr
->
clrTextBk
=
nmlvcd
.
clrTextBk
;
...
...
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