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
b2056c22
Commit
b2056c22
authored
Oct 10, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Oct 10, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix focus handling when deleting items, or changing modes.
Better label rect calculation in ICON mode.
parent
c95b2a02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
listview.c
dlls/comctl32/listview.c
+15
-7
No files found.
dlls/comctl32/listview.c
View file @
b2056c22
...
...
@@ -1429,7 +1429,7 @@ static BOOL LISTVIEW_GetItemMeasures(LISTVIEW_INFO *infoPtr, INT nItem,
/* compute rough rectangle where the label will go */
SetRectEmpty
(
&
rcText
);
rcText
.
right
=
infoPtr
->
nItemWidth
-
2
;
rcText
.
right
=
infoPtr
->
nItemWidth
-
TRAILING_PADDING
;
rcText
.
bottom
=
infoPtr
->
nItemHeight
;
if
(
uView
==
LVS_ICON
)
rcText
.
bottom
-=
ICON_TOP_PADDING
+
infoPtr
->
iconSize
.
cy
+
ICON_BOTTOM_PADDING
;
...
...
@@ -1442,7 +1442,7 @@ static BOOL LISTVIEW_GetItemMeasures(LISTVIEW_INFO *infoPtr, INT nItem,
DrawTextW
(
hdc
,
lvItem
.
pszText
,
-
1
,
&
rcText
,
uFormat
|
DT_CALCRECT
);
labelSize
.
cx
=
rcText
.
right
-
rcText
.
left
;
labelSize
.
cx
=
min
(
rcText
.
right
-
rcText
.
left
+
TRAILING_PADDING
,
infoPtr
->
nItemWidth
)
;
labelSize
.
cy
=
rcText
.
bottom
-
rcText
.
top
;
SelectObject
(
hdc
,
hOldFont
);
...
...
@@ -1466,9 +1466,8 @@ static BOOL LISTVIEW_GetItemMeasures(LISTVIEW_INFO *infoPtr, INT nItem,
{
Label
.
left
=
Icon
.
right
;
Label
.
top
=
Box
.
top
;
Label
.
right
=
Label
.
left
;
Label
.
right
=
Label
.
left
+
labelSize
.
cx
;
if
(
infoPtr
->
himlSmall
)
Label
.
right
+=
IMAGE_PADDING
;
Label
.
right
+=
labelSize
.
cx
+
TRAILING_PADDING
;
if
(
Label
.
right
>
Box
.
right
)
Label
.
right
=
Box
.
right
;
Label
.
bottom
=
Label
.
top
+
infoPtr
->
nItemHeight
;
}
...
...
@@ -3845,6 +3844,7 @@ static LRESULT LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr)
LISTVIEW_RemoveAllSelections
(
infoPtr
);
infoPtr
->
nSelectionMark
=-
1
;
infoPtr
->
nFocusedItem
=-
1
;
SetRectEmpty
(
&
infoPtr
->
rcFocus
);
/* But we are supposed to leave nHotItem as is! */
if
(
lStyle
&
LVS_OWNERDATA
)
...
...
@@ -4068,6 +4068,11 @@ static LRESULT LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem)
SendMessageW
((
infoPtr
->
hwndSelf
),
WM_NOTIFY
,
(
WPARAM
)
lCtrlId
,
(
LPARAM
)
&
nmlv
);
if
(
nItem
==
infoPtr
->
nFocusedItem
)
{
infoPtr
->
nFocusedItem
=
-
1
;
SetRectEmpty
(
&
infoPtr
->
rcFocus
);
}
/* remove it from the selection range */
item
.
state
=
LVIS_SELECTED
;
...
...
@@ -8271,9 +8276,6 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
{
infoPtr
->
dwStyle
=
lpss
->
styleNew
;
if
(
uOldView
==
LVS_REPORT
)
ShowWindow
(
infoPtr
->
hwndHeader
,
SW_HIDE
);
if
(((
lpss
->
styleOld
&
WS_HSCROLL
)
!=
0
)
&&
((
lpss
->
styleNew
&
WS_HSCROLL
)
==
0
))
ShowScrollBar
(
infoPtr
->
hwndSelf
,
SB_HORZ
,
FALSE
);
...
...
@@ -8286,7 +8288,13 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
* decide.
*/
if
(
uNewView
!=
uOldView
)
{
if
(
uOldView
==
LVS_REPORT
)
ShowWindow
(
infoPtr
->
hwndHeader
,
SW_HIDE
);
ShowScrollBar
(
infoPtr
->
hwndSelf
,
SB_BOTH
,
FALSE
);
SetRectEmpty
(
&
infoPtr
->
rcFocus
);
}
if
(
uNewView
==
LVS_ICON
)
{
...
...
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