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
c1ab903f
Commit
c1ab903f
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: Fix horizontal scrolling.
Signed-off-by:
Lauri Kenttä
<
lauri.kentta@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
571119a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
winefile.c
programs/winefile/winefile.c
+7
-1
No files found.
programs/winefile/winefile.c
View file @
c1ab903f
...
...
@@ -118,6 +118,7 @@ typedef struct {
#define COLUMNS 10
int
widths
[
COLUMNS
];
int
widths_shown
[
COLUMNS
];
int
positions
[
COLUMNS
+
1
];
BOOL
treePane
;
...
...
@@ -2355,6 +2356,7 @@ static HWND create_header(HWND parent, Pane* pane, UINT id)
hdi
.
pszText
=
g_pos_names
[
idx
];
hdi
.
fmt
=
HDF_STRING
|
g_pos_align
[
idx
];
hdi
.
cxy
=
pane
->
widths
[
idx
];
pane
->
widths_shown
[
idx
]
=
hdi
.
cxy
;
SendMessageW
(
hwnd
,
HDM_INSERTITEMW
,
idx
,
(
LPARAM
)
&
hdi
);
}
...
...
@@ -3168,17 +3170,20 @@ static void set_header(Pane* pane)
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
++
)
{
item
.
cxy
=
pane
->
widths
[
i
];
x
+=
pane
->
widths
[
i
];
pane
->
widths_shown
[
i
]
=
item
.
cxy
;
SendMessageW
(
pane
->
hwndHeader
,
HDM_SETITEMW
,
i
,
(
LPARAM
)
&
item
);
}
}
...
...
@@ -3190,13 +3195,14 @@ static LRESULT pane_notify(Pane* pane, NMHDR* pnmh)
case
HDN_ITEMCHANGEDW
:
{
LPNMHEADERW
phdn
=
(
LPNMHEADERW
)
pnmh
;
int
idx
=
phdn
->
iItem
;
int
dx
=
phdn
->
pitem
->
cxy
-
pane
->
widths
[
idx
];
int
dx
=
phdn
->
pitem
->
cxy
-
pane
->
widths
_shown
[
idx
];
int
i
;
RECT
clnt
;
GetClientRect
(
pane
->
hwnd
,
&
clnt
);
pane
->
widths
[
idx
]
+=
dx
;
pane
->
widths_shown
[
idx
]
+=
dx
;
for
(
i
=
idx
;
++
i
<=
COLUMNS
;
)
pane
->
positions
[
i
]
+=
dx
;
...
...
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