Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
31d4a7c4
Commit
31d4a7c4
authored
21 years ago
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
21 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Always setup the selection colour, not just in custom draw.
parent
be3b2569
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/comctl32/listview.c
+10
-12
10 additions, 12 deletions
dlls/comctl32/listview.c
with
10 additions
and
12 deletions
dlls/comctl32/listview.c
+
10
−
12
View file @
31d4a7c4
...
...
@@ -882,15 +882,10 @@ static inline DWORD notify_customdraw (LISTVIEW_INFO *infoPtr, DWORD dwDrawStage
return
result
;
}
static
DWORD
notify_
prepaint
(
LISTVIEW_INFO
*
infoPtr
,
HDC
hdc
,
NMLVCUSTOMDRAW
*
lpnmlvcd
)
static
void
prepaint
_setup
(
LISTVIEW_INFO
*
infoPtr
,
HDC
hdc
,
NMLVCUSTOMDRAW
*
lpnmlvcd
)
{
BOOL
isSelected
=
lpnmlvcd
->
nmcd
.
uItemState
&
CDIS_SELECTED
;
DWORD
cditemmode
=
notify_customdraw
(
infoPtr
,
CDDS_PREPAINT
,
lpnmlvcd
);
if
(
cditemmode
&
CDRF_SKIPDEFAULT
)
return
cditemmode
;
/* apprently, for selected items, we have to override the returned values */
if
(
isSelected
)
if
(
lpnmlvcd
->
nmcd
.
uItemState
&
CDIS_SELECTED
)
{
if
(
infoPtr
->
bFocus
)
{
...
...
@@ -916,8 +911,6 @@ static DWORD notify_prepaint (LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRAW *l
else
SetBkMode
(
hdc
,
TRANSPARENT
);
SetTextColor
(
hdc
,
lpnmlvcd
->
clrText
);
return
cditemmode
;
}
static
inline
DWORD
notify_postpaint
(
LISTVIEW_INFO
*
infoPtr
,
NMLVCUSTOMDRAW
*
lpnmlvcd
)
...
...
@@ -3569,9 +3562,10 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS
if
(
nSubItem
>
0
)
cdmode
=
infoPtr
->
cditemmode
;
if
(
cdmode
&
CDRF_NOTIFYITEMDRAW
)
cdsubitemmode
=
notify_
prepaint
(
infoPtr
,
hdc
,
&
nmlvcd
);
cdsubitemmode
=
notify_
customdraw
(
infoPtr
,
CDDS_PREPAINT
,
&
nmlvcd
);
if
(
nSubItem
==
0
)
infoPtr
->
cditemmode
=
cdsubitemmode
;
if
(
cdsubitemmode
&
CDRF_SKIPDEFAULT
)
goto
postpaint
;
prepaint_setup
(
infoPtr
,
hdc
,
&
nmlvcd
);
/* in full row select, subitems, will just use main item's colors */
if
(
nSubItem
&&
uView
==
LVS_REPORT
&&
(
infoPtr
->
dwLvExStyle
&
LVS_EX_FULLROWSELECT
))
...
...
@@ -3697,11 +3691,14 @@ static void LISTVIEW_RefreshOwnerDraw(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC h
if
(
cdmode
&
CDRF_NOTIFYITEMDRAW
)
{
customdraw_fill
(
&
nmlvcd
,
infoPtr
,
hdc
,
&
dis
.
rcItem
,
&
item
);
cditemmode
=
notify_
prepaint
(
infoPtr
,
hdc
,
&
nmlvcd
);
cditemmode
=
notify_
customdraw
(
infoPtr
,
CDDS_PREPAINT
,
&
nmlvcd
);
}
if
(
!
(
cditemmode
&
CDRF_SKIPDEFAULT
))
{
prepaint_setup
(
infoPtr
,
hdc
,
&
nmlvcd
);
SendMessageW
(
hwndParent
,
WM_DRAWITEM
,
dis
.
CtlID
,
(
LPARAM
)
&
dis
);
}
if
(
cditemmode
&
CDRF_NOTIFYPOSTPAINT
)
notify_postpaint
(
infoPtr
,
&
nmlvcd
);
...
...
@@ -3848,8 +3845,9 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc)
GetClientRect
(
infoPtr
->
hwndSelf
,
&
rcClient
);
customdraw_fill
(
&
nmlvcd
,
infoPtr
,
hdc
,
&
rcClient
,
0
);
cdmode
=
notify_
prepaint
(
infoPtr
,
hdc
,
&
nmlvcd
);
cdmode
=
notify_
customdraw
(
infoPtr
,
CDDS_PREPAINT
,
&
nmlvcd
);
if
(
cdmode
&
CDRF_SKIPDEFAULT
)
goto
enddraw
;
prepaint_setup
(
infoPtr
,
hdc
,
&
nmlvcd
);
/* Use these colors to draw the items */
infoPtr
->
clrTextBk
=
nmlvcd
.
clrTextBk
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment