Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
79ef39aa
Commit
79ef39aa
authored
Feb 02, 2020
by
Jean-Baptiste Mardelle
Browse files
Improve snapping, don't allow resize on lower zoom levels
parent
4acfecb0
Pipeline
#14380
passed with stage
in 23 minutes and 53 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/Clip.qml
View file @
79ef39aa
...
...
@@ -367,7 +367,7 @@ Rectangle {
x
:
-
clipRoot
.
border
.
width
height
:
parent
.
height
width
:
root
.
baseUnit
/
2
enabled
:
!
isLocked
enabled
:
!
isLocked
&&
(
pressed
||
clipRoot
.
width
>
3
*
width
)
hoverEnabled
:
true
drag.target
:
trimInMouseArea
drag.axis
:
Drag
.
XAxis
...
...
@@ -427,7 +427,7 @@ Rectangle {
opacity
:
0
Drag.active
:
trimInMouseArea
.
drag
.
active
Drag.proposedAction
:
Qt
.
MoveAction
visible
:
trimInMouseArea
.
pressed
||
(
root
.
activeTool
===
0
&&
!
mouseArea
.
drag
.
active
&&
clipRoot
.
width
>
4
*
width
)
visible
:
trimInMouseArea
.
pressed
||
(
root
.
activeTool
===
0
&&
!
mouseArea
.
drag
.
active
&&
parent
.
enabled
)
ToolTip
{
visible
:
trimInMouseArea
.
containsMouse
&&
!
trimInMouseArea
.
pressed
...
...
@@ -455,7 +455,7 @@ Rectangle {
height
:
parent
.
height
width
:
root
.
baseUnit
/
2
hoverEnabled
:
true
enabled
:
!
isLocked
enabled
:
!
isLocked
&&
(
pressed
||
clipRoot
.
width
>
3
*
width
)
property
bool
shiftTrim
:
false
property
bool
controlTrim
:
false
property
bool
sizeChanged
:
false
...
...
@@ -524,7 +524,7 @@ Rectangle {
opacity
:
0
Drag.active
:
trimOutMouseArea
.
drag
.
active
Drag.proposedAction
:
Qt
.
MoveAction
visible
:
trimOutMouseArea
.
pressed
||
(
root
.
activeTool
===
0
&&
!
mouseArea
.
drag
.
active
&&
clipRoot
.
width
>
4
*
width
)
visible
:
trimOutMouseArea
.
pressed
||
(
root
.
activeTool
===
0
&&
!
mouseArea
.
drag
.
active
&&
parent
.
enabled
)
}
}
...
...
src/timeline2/view/qml/timeline.qml
View file @
79ef39aa
...
...
@@ -247,7 +247,7 @@ Rectangle {
property
int
spacerFrame
:
-
1
property
int
spacerClickFrame
:
-
1
property
real
timeScale
:
timeline
.
scaleFactor
property
real
snapping
:
(
timeline
.
snap
&&
(
timeScale
<
2
*
baseUnit
))
?
10
/
Math
.
sqrt
(
timeScale
)
-
0.5
:
-
1
property
real
snapping
:
(
timeline
.
snap
&&
(
timeScale
<
2
*
baseUnit
))
?
baseUnit
/
(
timeScale
>
1
?
Math
.
sqrt
(
timeScale
)
:
timeScale
)
:
-
1
property
var
timelineSelection
:
timeline
.
selection
property
int
trackHeight
property
int
copiedClip
:
-
1
...
...
@@ -278,6 +278,7 @@ Rectangle {
// update dragged item pos
dragProxy
.
masterObject
.
updateDrag
()
}
console
.
log
(
'
GOT SCALE:
'
,
timeScale
,
'
- SNAPPING:
'
,
snapping
)
}
onConsumerPositionChanged
:
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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