Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f9c3a612
Commit
f9c3a612
authored
Feb 04, 2013
by
Daniel Jelinski
Committed by
Alexandre Julliard
Feb 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Do not touch icon spacing if set explicitly.
parent
0fb34587
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
listview.c
dlls/comctl32/listview.c
+8
-2
listview.c
dlls/comctl32/tests/listview.c
+17
-0
No files found.
dlls/comctl32/listview.c
View file @
f9c3a612
...
...
@@ -55,7 +55,6 @@
* -- LVA_SNAPTOGRID not implemented
* -- LISTVIEW_ApproximateViewRect partially implemented
* -- LISTVIEW_SetColumnWidth ignores header images & bitmap
* -- LISTVIEW_SetIconSpacing is incomplete
* -- LISTVIEW_StyleChanged doesn't handle some changes too well
*
* Speedups
...
...
@@ -290,6 +289,7 @@ typedef struct tagLISTVIEW_INFO
HIMAGELIST
himlSmall
;
HIMAGELIST
himlState
;
SIZE
iconSize
;
BOOL
autoSpacing
;
SIZE
iconSpacing
;
SIZE
iconStateSize
;
POINT
currIconPos
;
/* this is the position next icon will be placed */
...
...
@@ -8594,11 +8594,15 @@ static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy)
/* set to defaults, if instructed to */
if
(
cx
==
-
1
&&
cy
==
-
1
)
{
infoPtr
->
autoSpacing
=
TRUE
;
if
(
infoPtr
->
himlNormal
)
ImageList_GetIconSize
(
infoPtr
->
himlNormal
,
&
iconWidth
,
&
iconHeight
);
cx
=
GetSystemMetrics
(
SM_CXICONSPACING
)
-
GetSystemMetrics
(
SM_CXICON
)
+
iconWidth
;
cy
=
GetSystemMetrics
(
SM_CYICONSPACING
)
-
GetSystemMetrics
(
SM_CYICON
)
+
iconHeight
;
}
else
infoPtr
->
autoSpacing
=
FALSE
;
/* if 0 then keep width */
if
(
cx
!=
0
)
infoPtr
->
iconSpacing
.
cx
=
cx
;
...
...
@@ -8660,7 +8664,8 @@ static HIMAGELIST LISTVIEW_SetImageList(LISTVIEW_INFO *infoPtr, INT nType, HIMAG
himlOld
=
infoPtr
->
himlNormal
;
infoPtr
->
himlNormal
=
himl
;
if
(
infoPtr
->
uView
==
LV_VIEW_ICON
)
set_icon_size
(
&
infoPtr
->
iconSize
,
himl
,
FALSE
);
LISTVIEW_SetIconSpacing
(
infoPtr
,
-
1
,
-
1
);
if
(
infoPtr
->
autoSpacing
)
LISTVIEW_SetIconSpacing
(
infoPtr
,
-
1
,
-
1
);
break
;
case
LVSIL_SMALL
:
...
...
@@ -9374,6 +9379,7 @@ static LRESULT LISTVIEW_NCCreate(HWND hwnd, const CREATESTRUCTW *lpcs)
infoPtr
->
bRedraw
=
TRUE
;
infoPtr
->
bNoItemMetrics
=
TRUE
;
infoPtr
->
bDoChangeNotify
=
TRUE
;
infoPtr
->
autoSpacing
=
TRUE
;
infoPtr
->
iconSpacing
.
cx
=
GetSystemMetrics
(
SM_CXICONSPACING
)
-
GetSystemMetrics
(
SM_CXICON
);
infoPtr
->
iconSpacing
.
cy
=
GetSystemMetrics
(
SM_CYICONSPACING
)
-
GetSystemMetrics
(
SM_CYICON
);
infoPtr
->
nEditLabelItem
=
-
1
;
...
...
dlls/comctl32/tests/listview.c
View file @
f9c3a612
...
...
@@ -4643,6 +4643,23 @@ static void test_getitemspacing(void)
SendMessage
(
hwnd
,
LVM_SETIMAGELIST
,
LVSIL_NORMAL
,
(
LPARAM
)
himl40
);
ret
=
SendMessage
(
hwnd
,
LVM_GETITEMSPACING
,
FALSE
,
0
);
/* set size returned */
expect
(
100
,
LOWORD
(
ret
));
expect
(
100
,
HIWORD
(
ret
));
/* spacing = 0 - keep previous value */
ret
=
SendMessage
(
hwnd
,
LVM_SETICONSPACING
,
0
,
MAKELPARAM
(
0
,
-
1
));
expect
(
100
,
LOWORD
(
ret
));
expect
(
100
,
HIWORD
(
ret
));
ret
=
SendMessage
(
hwnd
,
LVM_GETITEMSPACING
,
FALSE
,
0
);
expect
(
100
,
LOWORD
(
ret
));
expect
(
0xFFFF
,
HIWORD
(
ret
));
ret
=
SendMessage
(
hwnd
,
LVM_SETICONSPACING
,
0
,
-
1
);
expect
(
100
,
LOWORD
(
ret
));
expect
(
0xFFFF
,
HIWORD
(
ret
));
ret
=
SendMessage
(
hwnd
,
LVM_GETITEMSPACING
,
FALSE
,
0
);
/* spacing + icon size returned */
expect
(
cx
+
40
,
LOWORD
(
ret
));
expect
(
cy
+
40
,
HIWORD
(
ret
));
...
...
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