Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vecs
FIJI Public
Commits
04f51588
Commit
04f51588
authored
Aug 24, 2017
by
Christian Fibich
Committed by
Stefan Tauner
May 04, 2018
Browse files
(Windows) Fix scrolling
parent
50a21e22
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/Tk/FIJIUtils.pm
View file @
04f51588
...
...
@@ -244,17 +244,17 @@ sub bind_mousewheel {
# bind the mouse wheel
if
(
$^O
eq
"
MSWin32
")
{
# Windows passes the 'delta' itself
$mw
->
bind
('
<MouseWheel>
'
=>
[
\
&_wheel_handler
,
$mw
]);
$mw
->
bind
('
<MouseWheel>
'
=>
[
\
&_wheel_handler
,
$mw
,
Tk::
Ev
('
D
')
]);
}
else
{
$mw
->
bind
('
<4>
'
=>
[
\
&_wheel_handler
,
-
1
,
$mw
]);
$mw
->
bind
('
<5>
'
=>
[
\
&_wheel_handler
,
1
,
$mw
]);
$mw
->
bind
('
<4>
'
=>
[
\
&_wheel_handler
,
$mw
,
-
1
]);
$mw
->
bind
('
<5>
'
=>
[
\
&_wheel_handler
,
$mw
,
1
]);
}
}
sub
_wheel_handler
{
my
(
$event_widget
,
$
val
,
$mw
)
=
@_
;
my
(
$event_widget
,
$
mw
,
$val
)
=
@_
;
my
$container
;
...
...
@@ -272,9 +272,9 @@ sub _wheel_handler {
next
if
$container
!=
@
{
$mw
->
{'
scrollable_widgets
'}}[
$index
];
my
$scrolled
=
$widget_to_scroll
->
Subwidget
('
scrolled
');
if
(
$^O
eq
"
MSWin32
")
{
$scrolled
->
yview
(
scroll
=>
(
-
$val
/
120
)
*SCROLL
,'
units
');
$scrolled
->
yview
(
"
scroll
",
(
-
$val
/
120
)
*SCROLL
,'
units
');
}
else
{
$scrolled
->
yview
(
scroll
=>
$val*SCROLL
,'
units
');
$scrolled
->
yview
(
"
scroll
",
$val*SCROLL
,'
units
');
}
goto
END
;
}
...
...
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