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
dcd54f08
Commit
dcd54f08
authored
Nov 26, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Get rid of helper used once.
parent
a729e040
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
31 deletions
+13
-31
listview.c
dlls/comctl32/listview.c
+13
-31
No files found.
dlls/comctl32/listview.c
View file @
dcd54f08
...
...
@@ -453,7 +453,6 @@ static void LISTVIEW_GetItemBox(const LISTVIEW_INFO *, INT, LPRECT);
static
void
LISTVIEW_GetItemOrigin
(
const
LISTVIEW_INFO
*
,
INT
,
LPPOINT
);
static
BOOL
LISTVIEW_GetItemPosition
(
const
LISTVIEW_INFO
*
,
INT
,
LPPOINT
);
static
BOOL
LISTVIEW_GetItemRect
(
const
LISTVIEW_INFO
*
,
INT
,
LPRECT
);
static
INT
LISTVIEW_GetLabelWidth
(
const
LISTVIEW_INFO
*
,
INT
);
static
void
LISTVIEW_GetOrigin
(
const
LISTVIEW_INFO
*
,
LPPOINT
);
static
BOOL
LISTVIEW_GetViewRect
(
const
LISTVIEW_INFO
*
,
LPRECT
);
static
void
LISTVIEW_UpdateSize
(
LISTVIEW_INFO
*
);
...
...
@@ -2786,11 +2785,23 @@ static INT LISTVIEW_CalculateItemWidth(const LISTVIEW_INFO *infoPtr)
}
else
/* LV_VIEW_SMALLICON, or LV_VIEW_LIST */
{
WCHAR
szDispText
[
DISP_TEXT_SIZE
]
=
{
'\0'
};
LVITEMW
lvItem
;
BOOL
empty
;
INT
i
;
lvItem
.
mask
=
LVIF_TEXT
;
lvItem
.
iSubItem
=
0
;
for
(
i
=
0
;
i
<
infoPtr
->
nItemCount
;
i
++
)
nItemWidth
=
max
(
LISTVIEW_GetLabelWidth
(
infoPtr
,
i
),
nItemWidth
);
{
lvItem
.
iItem
=
i
;
lvItem
.
pszText
=
szDispText
;
lvItem
.
cchTextMax
=
DISP_TEXT_SIZE
;
if
(
LISTVIEW_GetItemW
(
infoPtr
,
&
lvItem
))
nItemWidth
=
max
(
LISTVIEW_GetStringWidthT
(
infoPtr
,
lvItem
.
pszText
,
TRUE
),
nItemWidth
);
}
empty
=
nItemWidth
==
0
;
if
(
infoPtr
->
himlSmall
)
nItemWidth
+=
infoPtr
->
iconSize
.
cx
;
...
...
@@ -6822,35 +6833,6 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR
return
TRUE
;
}
/***
* DESCRIPTION:
* Retrieves the width of a label.
*
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
*
* RETURN:
* SUCCESS : string width (in pixels)
* FAILURE : zero
*/
static
INT
LISTVIEW_GetLabelWidth
(
const
LISTVIEW_INFO
*
infoPtr
,
INT
nItem
)
{
WCHAR
szDispText
[
DISP_TEXT_SIZE
]
=
{
'\0'
};
LVITEMW
lvItem
;
TRACE
(
"(nItem=%d)
\n
"
,
nItem
);
lvItem
.
mask
=
LVIF_TEXT
;
lvItem
.
iItem
=
nItem
;
lvItem
.
iSubItem
=
0
;
lvItem
.
pszText
=
szDispText
;
lvItem
.
cchTextMax
=
DISP_TEXT_SIZE
;
if
(
!
LISTVIEW_GetItemW
(
infoPtr
,
&
lvItem
))
return
0
;
return
LISTVIEW_GetStringWidthT
(
infoPtr
,
lvItem
.
pszText
,
TRUE
);
}
/***
* DESCRIPTION:
* Retrieves the spacing between listview control items.
...
...
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