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
3a7e2fa7
Commit
3a7e2fa7
authored
Mar 06, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix text template timeline thumbnail
parent
2ee31484
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/Clip.qml
View file @
3a7e2fa7
...
...
@@ -218,8 +218,7 @@ Rectangle {
}
*/
property
bool
noThumbs
:
(
isAudio
||
itemType
==
ProducerType
.
Color
||
mltService
===
''
)
property
bool
isImage
:
itemType
==
ProducerType
.
Image
property
string
baseThumbPath
:
noThumbs
?
''
:
'
image://thumbnail/
'
+
binId
+
'
/
'
+
documentId
+
'
/
'
+
(
isImage
?
'
#0
'
:
'
#
'
)
property
string
baseThumbPath
:
noThumbs
?
''
:
'
image://thumbnail/
'
+
binId
+
'
/
'
+
documentId
+
'
/#
'
DropArea
{
//Drop area for clips
anchors.fill
:
clipRoot
...
...
src/timeline2/view/qml/ClipThumbs.qml
View file @
3a7e2fa7
...
...
@@ -9,12 +9,13 @@ Row {
anchors.fill
:
parent
visible
:
!
isAudio
opacity
:
clipStatus
==
ClipState
.
Disabled
?
0.2
:
1
property
bool
fixedThumbs
:
clipRoot
.
itemType
==
ProducerType
.
Image
||
clipRoot
.
itemType
==
ProducerType
.
Text
||
clipRoot
.
itemType
==
ProducerType
.
TextTemplate
property
int
thumbWidth
:
container
.
height
*
root
.
dar
property
bool
enableCache
:
clipRoot
.
itemType
==
ProducerType
.
Video
||
clipRoot
.
itemType
==
ProducerType
.
AV
function
reload
()
{
console
.
log
(
'
+++++
\n\n
triggered ML thumb reload
\n\n
++++++++++++++
'
)
clipRoot
.
baseThumbPath
=
clipRoot
.
variableThumbs
?
''
:
'
image://thumbnail/
'
+
clipRoot
.
binId
+
'
/
'
+
Math
.
random
()
+
'
/
'
+
(
clipRoot
.
isImage
?
'
#0
'
:
'
#
'
)
clipRoot
.
baseThumbPath
=
clipRoot
.
variableThumbs
?
''
:
'
image://thumbnail/
'
+
clipRoot
.
binId
+
'
/
'
+
Math
.
random
()
+
'
/#
'
}
Repeater
{
...
...
@@ -28,8 +29,8 @@ Row {
property
int
startFrame
:
clipRoot
.
inPoint
property
int
endFrame
:
clipRoot
.
outPoint
property
real
imageWidth
:
Math
.
max
(
thumbRow
.
thumbWidth
,
container
.
width
/
thumbRepeater
.
count
)
property
int
thumbStartFrame
:
(
clipRoot
.
speed
>=
0
)
?
Math
.
round
(
clipRoot
.
inPoint
*
clipRoot
.
speed
)
:
Math
.
round
((
clipRoot
.
maxDuration
-
clipRoot
.
inPoint
)
*
-
clipRoot
.
speed
-
1
)
property
int
thumbEndFrame
:
(
clipRoot
.
speed
>=
0
)
?
Math
.
round
(
clipRoot
.
outPoint
*
clipRoot
.
speed
)
:
Math
.
round
((
clipRoot
.
maxDuration
-
clipRoot
.
outPoint
)
*
-
clipRoot
.
speed
-
1
)
property
int
thumbStartFrame
:
fixedThumbs
?
0
:
(
clipRoot
.
speed
>=
0
)
?
Math
.
round
(
clipRoot
.
inPoint
*
clipRoot
.
speed
)
:
Math
.
round
((
clipRoot
.
maxDuration
-
clipRoot
.
inPoint
)
*
-
clipRoot
.
speed
-
1
)
property
int
thumbEndFrame
:
fixedThumbs
?
0
:
(
clipRoot
.
speed
>=
0
)
?
Math
.
round
(
clipRoot
.
outPoint
*
clipRoot
.
speed
)
:
Math
.
round
((
clipRoot
.
maxDuration
-
clipRoot
.
outPoint
)
*
-
clipRoot
.
speed
-
1
)
Image
{
width
:
thumbRepeater
.
imageWidth
...
...
@@ -37,7 +38,7 @@ Row {
fillMode
:
Image
.
PreserveAspectFit
asynchronous
:
true
cache
:
enableCache
property
int
currentFrame
:
thumbRepeater
.
count
<
3
?
(
index
==
0
?
thumbRepeater
.
thumbStartFrame
:
thumbRepeater
.
thumbEndFrame
)
:
Math
.
floor
(
clipRoot
.
inPoint
+
Math
.
round
((
index
)
*
width
/
timeline
.
scaleFactor
)
*
clipRoot
.
speed
)
property
int
currentFrame
:
fixedThumbs
?
0
:
thumbRepeater
.
count
<
3
?
(
index
==
0
?
thumbRepeater
.
thumbStartFrame
:
thumbRepeater
.
thumbEndFrame
)
:
Math
.
floor
(
clipRoot
.
inPoint
+
Math
.
round
((
index
)
*
width
/
timeline
.
scaleFactor
)
*
clipRoot
.
speed
)
horizontalAlignment
:
thumbRepeater
.
count
<
3
?
(
index
==
0
?
Image
.
AlignLeft
:
Image
.
AlignRight
)
:
Image
.
AlignLeft
source
:
thumbRepeater
.
count
<
3
?
(
clipRoot
.
baseThumbPath
+
currentFrame
)
:
(
index
*
width
<
clipRoot
.
scrollStart
-
width
||
index
*
width
>
clipRoot
.
scrollStart
+
scrollView
.
contentItem
.
width
)
?
''
:
clipRoot
.
baseThumbPath
+
currentFrame
onStatusChanged
:
{
...
...
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