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
a3547a13
Commit
a3547a13
authored
May 30, 2016
by
Lauri Kenttä
Committed by
Alexandre Julliard
May 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winefile: Clarify header width calculations.
Signed-off-by:
Lauri Kenttä
<
lauri.kentta@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c1ab903f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
winefile.c
programs/winefile/winefile.c
+9
-18
No files found.
programs/winefile/winefile.c
View file @
a3547a13
...
...
@@ -3163,29 +3163,20 @@ static void set_header(Pane* pane)
{
HDITEMW
item
;
int
scroll_pos
=
GetScrollPos
(
pane
->
hwnd
,
SB_HORZ
);
int
i
=
0
,
x
=
0
;
int
i
;
item
.
mask
=
HDI_WIDTH
;
item
.
cxy
=
0
;
for
(;
(
i
<
COLUMNS
)
&&
(
x
+
pane
->
widths
[
i
]
<
scroll_pos
);
i
++
)
{
x
+=
pane
->
widths
[
i
];
pane
->
widths_shown
[
i
]
=
item
.
cxy
;
SendMessageW
(
pane
->
hwndHeader
,
HDM_SETITEMW
,
i
,
(
LPARAM
)
&
item
);
}
if
(
i
<
COLUMNS
)
{
x
+=
pane
->
widths
[
i
];
item
.
cxy
=
x
-
scroll_pos
;
pane
->
widths_shown
[
i
]
=
item
.
cxy
;
SendMessageW
(
pane
->
hwndHeader
,
HDM_SETITEMW
,
i
++
,
(
LPARAM
)
&
item
);
for
(;
i
<
COLUMNS
;
i
++
)
{
for
(
i
=
0
;
i
<
COLUMNS
;
++
i
)
{
if
(
pane
->
positions
[
i
]
>=
scroll_pos
)
{
item
.
cxy
=
pane
->
widths
[
i
];
x
+=
pane
->
widths
[
i
];
pane
->
widths_shown
[
i
]
=
item
.
cxy
;
SendMessageW
(
pane
->
hwndHeader
,
HDM_SETITEMW
,
i
,
(
LPARAM
)
&
item
);
}
else
if
(
pane
->
positions
[
i
+
1
]
<=
scroll_pos
)
{
item
.
cxy
=
0
;
}
else
{
item
.
cxy
=
pane
->
positions
[
i
+
1
]
-
scroll_pos
;
}
pane
->
widths_shown
[
i
]
=
item
.
cxy
;
SendMessageW
(
pane
->
hwndHeader
,
HDM_SETITEMW
,
i
,
(
LPARAM
)
&
item
);
}
}
...
...
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