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
db1a3c61
Commit
db1a3c61
authored
Nov 10, 2017
by
Andrew Eikum
Committed by
Alexandre Julliard
Nov 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Size ShellView column widths by font width.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8d004d51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
shlview.c
dlls/shell32/shlview.c
+13
-3
No files found.
dlls/shell32/shlview.c
View file @
db1a3c61
...
...
@@ -385,6 +385,9 @@ static void ShellView_InitList(IShellViewImpl *This)
SHELLDETAILS
sd
;
WCHAR
nameW
[
50
];
HRESULT
hr
;
HFONT
list_font
,
old_font
;
HDC
list_dc
;
TEXTMETRICW
tm
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -406,6 +409,13 @@ static void ShellView_InitList(IShellViewImpl *This)
}
}
list_font
=
(
HFONT
)
SendMessageW
(
This
->
hWndList
,
WM_GETFONT
,
0
,
0
);
list_dc
=
GetDC
(
This
->
hWndList
);
old_font
=
SelectObject
(
list_dc
,
list_font
);
GetTextMetricsW
(
list_dc
,
&
tm
);
SelectObject
(
list_dc
,
old_font
);
ReleaseDC
(
This
->
hWndList
,
list_dc
);
for
(
This
->
columns
=
0
;;
This
->
columns
++
)
{
if
(
This
->
pSF2Parent
)
...
...
@@ -415,9 +425,9 @@ static void ShellView_InitList(IShellViewImpl *This)
if
(
FAILED
(
hr
))
break
;
lvColumn
.
fmt
=
sd
.
fmt
;
lvColumn
.
cx
=
sd
.
cxChar
*
8
;
/* chars->pixel */
StrRetToStrNW
(
nameW
,
sizeof
(
nameW
)
/
sizeof
(
WCHAR
),
&
sd
.
str
,
NULL
);
SendMessageW
(
This
->
hWndList
,
LVM_INSERTCOLUMNW
,
This
->
columns
,
(
LPARAM
)
&
lvColumn
);
lvColumn
.
cx
=
MulDiv
(
sd
.
cxChar
,
tm
.
tmAveCharWidth
*
3
,
2
)
;
/* chars->pixel */
StrRetToStrNW
(
nameW
,
sizeof
(
nameW
)
/
sizeof
(
WCHAR
),
&
sd
.
str
,
NULL
);
SendMessageW
(
This
->
hWndList
,
LVM_INSERTCOLUMNW
,
This
->
columns
,
(
LPARAM
)
&
lvColumn
);
}
if
(
details
)
IShellDetails_Release
(
details
);
...
...
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