Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
c46b8b3c
Commit
c46b8b3c
authored
May 13, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve timeline position on zoom
parent
acbe4fe5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
src/timeline2/view/qml/timeline.qml
src/timeline2/view/qml/timeline.qml
+11
-1
No files found.
src/timeline2/view/qml/timeline.qml
View file @
c46b8b3c
...
...
@@ -159,6 +159,16 @@ Rectangle {
return
-
1
;
}
}
function
getMouseX
()
{
if
(
dragProxy
.
draggedItem
>
-
1
&&
dragProxy
.
masterObject
)
{
return
(
dragProxy
.
masterObject
.
x
+
dragProxy
.
masterObject
.
mouseXPos
)
-
scrollView
.
contentX
}
if
(
tracksArea
.
containsMouse
)
{
return
tracksArea
.
mouseX
}
else
{
return
-
1
;
}
}
function
getScrollPos
()
{
return
scrollView
.
contentX
...
...
@@ -297,7 +307,7 @@ Rectangle {
//onCurrentTrackChanged: timeline.selection = []
onTimeScaleChanged
:
{
if
(
root
.
zoomOnMouse
>=
0
)
{
scrollView
.
contentX
=
Math
.
max
(
0
,
root
.
zoomOnMouse
*
timeline
.
scaleFactor
-
tracksArea
.
m
ouseX
)
scrollView
.
contentX
=
Math
.
max
(
0
,
root
.
zoomOnMouse
*
timeline
.
scaleFactor
-
getM
ouseX
()
)
root
.
zoomOnMouse
=
-
1
}
else
{
scrollView
.
contentX
=
Math
.
max
(
0
,
root
.
consumerPosition
*
timeline
.
scaleFactor
-
(
scrollView
.
width
/
2
))
...
...
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