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
39398aed
Commit
39398aed
authored
Jun 04, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Improve grid drawing on LVS_EX_GRIDLINES style.
parent
f8904e15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
14 deletions
+23
-14
listview.c
dlls/comctl32/listview.c
+23
-14
No files found.
dlls/comctl32/listview.c
View file @
39398aed
...
...
@@ -4166,10 +4166,11 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc)
{
INT
rgntype
;
INT
y
,
itemheight
;
INT
col
,
index
;
HPEN
hPen
,
hOldPen
;
RECT
rcClip
,
rcItem
=
{
0
};
POINT
Origin
;
RANGE
colRange
;
RANGE
S
colRanges
;
ITERATOR
j
;
BOOL
rmost
=
FALSE
;
...
...
@@ -4182,21 +4183,23 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc)
/* Get scroll info once before loop */
LISTVIEW_GetOrigin
(
infoPtr
,
&
Origin
);
colRanges
=
ranges_create
(
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
));
/* narrow down the columns we need to paint */
for
(
colRange
.
lower
=
0
;
colRange
.
lower
<
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
);
colRange
.
lower
++
)
{
LISTVIEW_GetHeaderRect
(
infoPtr
,
colRange
.
lower
,
&
rcItem
);
if
(
rcItem
.
right
+
Origin
.
x
>=
rcClip
.
left
)
break
;
}
for
(
colRange
.
upper
=
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
);
colRange
.
upper
>
0
;
colRange
.
upper
--
)
for
(
col
=
0
;
col
<
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
);
col
++
)
{
LISTVIEW_GetHeaderRect
(
infoPtr
,
colRange
.
upper
-
1
,
&
rcItem
);
if
(
rcItem
.
left
+
Origin
.
x
<
rcClip
.
right
)
break
;
index
=
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_ORDERTOINDEX
,
col
,
0
);
LISTVIEW_GetHeaderRect
(
infoPtr
,
index
,
&
rcItem
);
if
((
rcItem
.
right
+
Origin
.
x
>=
rcClip
.
left
)
&&
(
rcItem
.
left
+
Origin
.
x
<
rcClip
.
right
))
ranges_additem
(
colRanges
,
index
);
}
/* is right most vertical line visible? */
if
(
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
)
>
0
)
{
LISTVIEW_GetHeaderRect
(
infoPtr
,
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
)
-
1
,
&
rcItem
);
index
=
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_ORDERTOINDEX
,
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
)
-
1
,
0
);
LISTVIEW_GetHeaderRect
(
infoPtr
,
index
,
&
rcItem
);
rmost
=
(
rcItem
.
right
+
Origin
.
x
<
rcClip
.
right
);
}
...
...
@@ -4205,11 +4208,11 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc)
hOldPen
=
SelectObject
(
hdc
,
hPen
);
/* draw the vertical lines for the columns */
iterator_range
items
(
&
j
,
colRange
);
iterator_range
sitems
(
&
j
,
colRanges
);
while
(
iterator_next
(
&
j
))
{
LISTVIEW_GetHeaderRect
(
infoPtr
,
j
.
nItem
,
&
rcItem
);
if
(
rcItem
.
left
==
0
)
continue
;
/* skip
fir
st column */
if
(
rcItem
.
left
==
0
)
continue
;
/* skip
leftmo
st column */
rcItem
.
left
+=
Origin
.
x
;
rcItem
.
right
+=
Origin
.
x
;
rcItem
.
top
=
infoPtr
->
rcList
.
top
;
...
...
@@ -4222,8 +4225,14 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc)
/* draw rightmost grid line if visible */
if
(
rmost
)
{
MoveToEx
(
hdc
,
rcItem
.
right
,
rcItem
.
top
,
NULL
);
LineTo
(
hdc
,
rcItem
.
right
,
rcItem
.
bottom
);
index
=
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_ORDERTOINDEX
,
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
)
-
1
,
0
);
LISTVIEW_GetHeaderRect
(
infoPtr
,
index
,
&
rcItem
);
rcItem
.
right
+=
Origin
.
x
;
MoveToEx
(
hdc
,
rcItem
.
right
,
infoPtr
->
rcList
.
top
,
NULL
);
LineTo
(
hdc
,
rcItem
.
right
,
infoPtr
->
rcList
.
bottom
);
}
/* draw the horizontial lines for the rows */
...
...
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