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
8cf54c56
Commit
8cf54c56
authored
May 30, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Item horizontal position isn't applied for any item bounds on LVS_REPORT.
parent
d56839f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
5 deletions
+67
-5
listview.c
dlls/comctl32/listview.c
+2
-4
listview.c
dlls/comctl32/tests/listview.c
+65
-1
No files found.
dlls/comctl32/listview.c
View file @
8cf54c56
...
...
@@ -2158,7 +2158,7 @@ calc_label:
}
/************************************************************/
/* compute S
TATEICON bounding box
*/
/* compute S
ELECT bounding box
*/
/************************************************************/
if
(
doSelectBox
)
{
...
...
@@ -5928,7 +5928,6 @@ static BOOL LISTVIEW_GetItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT
BOOL
doLabel
=
TRUE
,
oversizedBox
=
FALSE
;
POINT
Position
,
Origin
;
LVITEMW
lvItem
;
INT
type
;
TRACE
(
"(hwnd=%p, nItem=%d, lprc=%p)
\n
"
,
infoPtr
->
hwndSelf
,
nItem
,
lprc
);
...
...
@@ -5963,7 +5962,6 @@ static BOOL LISTVIEW_GetItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT
lvItem
.
state
=
(
oversizedBox
?
LVIS_FOCUSED
:
0
);
}
type
=
lprc
->
left
;
if
(
uView
==
LVS_REPORT
&&
(
infoPtr
->
dwLvExStyle
&
LVS_EX_FULLROWSELECT
)
&&
lprc
->
left
==
LVIR_SELECTBOUNDS
)
lprc
->
left
=
LVIR_BOUNDS
;
switch
(
lprc
->
left
)
...
...
@@ -5989,7 +5987,7 @@ static BOOL LISTVIEW_GetItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT
return
FALSE
;
}
if
(
(
uView
==
LVS_REPORT
)
&&
(
type
==
LVIR_BOUNDS
)
)
if
(
uView
==
LVS_REPORT
)
OffsetRect
(
lprc
,
Origin
.
x
,
Position
.
y
+
Origin
.
y
);
else
OffsetRect
(
lprc
,
Position
.
x
+
Origin
.
x
,
Position
.
y
+
Origin
.
y
);
...
...
dlls/comctl32/tests/listview.c
View file @
8cf54c56
...
...
@@ -2597,6 +2597,8 @@ static void test_columnscreation(void)
static
void
test_getitemrect
(
void
)
{
HWND
hwnd
;
HIMAGELIST
himl
;
HBITMAP
hbm
;
RECT
rect
;
DWORD
r
;
LVITEMA
item
;
...
...
@@ -2650,7 +2652,24 @@ static void test_getitemrect(void)
r
=
SendMessage
(
hwnd
,
LVM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
expect
(
TRUE
,
r
);
/* padding */
todo_wine
expect
(
2
,
rect
.
left
);
expect
(
2
,
rect
.
left
);
rect
.
left
=
LVIR_LABEL
;
rect
.
right
=
rect
.
top
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
expect
(
TRUE
,
r
);
/* padding, column width */
expect
(
2
,
rect
.
left
);
expect
(
50
,
rect
.
right
);
/* no icons attached */
rect
.
left
=
LVIR_ICON
;
rect
.
right
=
rect
.
top
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
expect
(
TRUE
,
r
);
/* padding */
expect
(
2
,
rect
.
left
);
expect
(
2
,
rect
.
right
);
/* change order */
order
[
0
]
=
1
;
order
[
1
]
=
0
;
...
...
@@ -2677,6 +2696,51 @@ static void test_getitemrect(void)
/* column width + padding */
todo_wine
expect
(
102
,
rect
.
left
);
/* back to initial order */
order
[
0
]
=
0
;
order
[
1
]
=
1
;
r
=
SendMessage
(
hwnd
,
LVM_SETCOLUMNORDERARRAY
,
2
,
(
LPARAM
)
&
order
);
expect
(
TRUE
,
r
);
/* state icons */
himl
=
ImageList_Create
(
16
,
16
,
0
,
2
,
2
);
ok
(
himl
!=
NULL
,
"failed to create imagelist
\n
"
);
hbm
=
CreateBitmap
(
16
,
16
,
1
,
1
,
NULL
);
ok
(
hbm
!=
NULL
,
"failed to create bitmap
\n
"
);
r
=
ImageList_Add
(
himl
,
hbm
,
0
);
ok
(
r
==
0
,
"should be zero
\n
"
);
hbm
=
CreateBitmap
(
16
,
16
,
1
,
1
,
NULL
);
ok
(
hbm
!=
NULL
,
"failed to create bitmap
\n
"
);
r
=
ImageList_Add
(
himl
,
hbm
,
0
);
ok
(
r
==
1
,
"should be one
\n
"
);
r
=
SendMessage
(
hwnd
,
LVM_SETIMAGELIST
,
LVSIL_STATE
,
(
LPARAM
)
himl
);
ok
(
r
==
0
,
"should return zero
\n
"
);
item
.
mask
=
LVIF_STATE
;
item
.
state
=
INDEXTOSTATEIMAGEMASK
(
1
);
item
.
stateMask
=
LVIS_STATEIMAGEMASK
;
item
.
iItem
=
0
;
item
.
iSubItem
=
0
;
r
=
SendMessage
(
hwnd
,
LVM_SETITEM
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
r
);
/* icon bounds */
rect
.
left
=
LVIR_ICON
;
rect
.
right
=
rect
.
top
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
expect
(
TRUE
,
r
);
/* padding + stateicon width */
expect
(
18
,
rect
.
left
);
expect
(
18
,
rect
.
right
);
/* label bounds */
rect
.
left
=
LVIR_LABEL
;
rect
.
right
=
rect
.
top
=
rect
.
bottom
=
-
1
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rect
);
expect
(
TRUE
,
r
);
/* padding + stateicon width -> column width */
expect
(
18
,
rect
.
left
);
expect
(
50
,
rect
.
right
);
DestroyWindow
(
hwnd
);
}
...
...
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