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
19a1c423
Commit
19a1c423
authored
Oct 28, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Oct 28, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup, and simplification of UpdateSize.
parent
9a9fcab7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
44 deletions
+30
-44
listview.c
dlls/comctl32/listview.c
+30
-44
No files found.
dlls/comctl32/listview.c
View file @
19a1c423
...
...
@@ -375,7 +375,7 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *, INT);
static
BOOL
LISTVIEW_SetItemT
(
LISTVIEW_INFO
*
,
LPLVITEMW
,
BOOL
);
static
void
LISTVIEW_UpdateScroll
(
LISTVIEW_INFO
*
);
static
void
LISTVIEW_SetSelection
(
LISTVIEW_INFO
*
,
INT
);
static
BOOL
LISTVIEW_UpdateSize
(
LISTVIEW_INFO
*
);
static
void
LISTVIEW_UpdateSize
(
LISTVIEW_INFO
*
);
static
HWND
LISTVIEW_EditLabelT
(
LISTVIEW_INFO
*
,
INT
,
BOOL
);
static
LRESULT
LISTVIEW_Command
(
LISTVIEW_INFO
*
,
WPARAM
,
LPARAM
);
static
BOOL
LISTVIEW_SortItems
(
LISTVIEW_INFO
*
,
PFNLVCOMPARE
,
LPARAM
);
...
...
@@ -8059,9 +8059,12 @@ static LRESULT LISTVIEW_SetRedraw(LISTVIEW_INFO *infoPtr, BOOL bRedraw)
*/
static
LRESULT
LISTVIEW_Size
(
LISTVIEW_INFO
*
infoPtr
,
int
Width
,
int
Height
)
{
RECT
rcOld
=
infoPtr
->
rcList
;
TRACE
(
"(width=%d, height=%d)
\n
"
,
Width
,
Height
);
if
(
!
LISTVIEW_UpdateSize
(
infoPtr
))
return
0
;
LISTVIEW_UpdateSize
(
infoPtr
);
if
(
EqualRect
(
&
rcOld
,
&
infoPtr
->
rcList
))
return
0
;
/* do not bother with display related stuff if we're not redrawing */
if
(
!
is_redrawing
(
infoPtr
))
return
0
;
...
...
@@ -8084,58 +8087,41 @@ static LRESULT LISTVIEW_Size(LISTVIEW_INFO *infoPtr, int Width, int Height)
* [I] infoPtr : valid pointer to the listview structure
*
* RETURN:
* Zero if no size change
* 1 of size changed
* None
*/
static
BOOL
LISTVIEW_UpdateSize
(
LISTVIEW_INFO
*
infoPtr
)
static
void
LISTVIEW_UpdateSize
(
LISTVIEW_INFO
*
infoPtr
)
{
UINT
uView
=
infoPtr
->
dwStyle
&
LVS_TYPEMASK
;
RECT
rcList
;
RECT
rcOld
;
UINT
uView
=
infoPtr
->
dwStyle
&
LVS_TYPEMASK
;
GetClientRect
(
infoPtr
->
hwndSelf
,
&
rcList
);
CopyRect
(
&
rcOld
,
&
(
infoPtr
->
rcList
));
infoPtr
->
rcList
.
left
=
0
;
infoPtr
->
rcList
.
right
=
max
(
rcList
.
right
-
rcList
.
left
,
1
);
infoPtr
->
rcList
.
top
=
0
;
infoPtr
->
rcList
.
bottom
=
max
(
rcList
.
bottom
-
rcList
.
top
,
1
);
GetClientRect
(
infoPtr
->
hwndSelf
,
&
infoPtr
->
rcList
);
if
(
uView
==
LVS_LIST
)
{
/* Apparently the "LIST" style is supposed to have the same
* number of items in a column even if there is no scroll bar.
* Since if a scroll bar already exists then the bottom is already
* reduced, only reduce if the scroll bar does not currently exist.
* The "2" is there to mimic the native control. I think it may be
* related to either padding or edges. (GLA 7/2002)
*/
if
(
!
(
infoPtr
->
dwStyle
&
WS_HSCROLL
))
if
(
uView
==
LVS_LIST
)
{
INT
nHScrollHeight
=
GetSystemMetrics
(
SM_CYHSCROLL
);
if
(
infoPtr
->
rcList
.
bottom
>
nHScrollHeight
)
infoPtr
->
rcList
.
bottom
-=
(
nHScrollHeight
+
2
);
/* Apparently the "LIST" style is supposed to have the same
* number of items in a column even if there is no scroll bar.
* Since if a scroll bar already exists then the bottom is already
* reduced, only reduce if the scroll bar does not currently exist.
* The "2" is there to mimic the native control. I think it may be
* related to either padding or edges. (GLA 7/2002)
*/
if
(
!
(
infoPtr
->
dwStyle
&
WS_HSCROLL
))
infoPtr
->
rcList
.
bottom
-=
GetSystemMetrics
(
SM_CYHSCROLL
);
infoPtr
->
rcList
.
bottom
=
max
(
infoPtr
->
rcList
.
bottom
-
2
,
0
);
}
else
else
if
(
uView
==
LVS_REPORT
)
{
if
(
infoPtr
->
rcList
.
bottom
>
2
)
infoPtr
->
rcList
.
bottom
-=
2
;
}
}
else
if
(
uView
==
LVS_REPORT
)
{
HDLAYOUT
hl
;
WINDOWPOS
wp
;
HDLAYOUT
hl
;
WINDOWPOS
wp
;
hl
.
prc
=
&
rcList
;
hl
.
pwpos
=
&
wp
;
Header_Layout
(
infoPtr
->
hwndHeader
,
&
hl
);
hl
.
prc
=
&
infoPtr
->
rcList
;
hl
.
pwpos
=
&
wp
;
Header_Layout
(
infoPtr
->
hwndHeader
,
&
hl
);
SetWindowPos
(
wp
.
hwnd
,
wp
.
hwndInsertAfter
,
wp
.
x
,
wp
.
y
,
wp
.
cx
,
wp
.
cy
,
wp
.
flags
);
SetWindowPos
(
wp
.
hwnd
,
wp
.
hwndInsertAfter
,
wp
.
x
,
wp
.
y
,
wp
.
cx
,
wp
.
cy
,
wp
.
flags
);
if
(
!
(
LVS_NOCOLUMNHEADER
&
infoPtr
->
dwStyle
))
infoPtr
->
rcList
.
top
=
max
(
wp
.
cy
,
0
);
}
return
(
EqualRect
(
&
rcOld
,
&
(
infoPtr
->
rcList
)));
if
(
!
(
infoPtr
->
dwStyle
&
LVS_NOCOLUMNHEADER
))
infoPtr
->
rcList
.
top
=
max
(
wp
.
cy
,
0
);
}
}
/***
...
...
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