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
Multimedia
Kdenlive
Commits
c2262e4f
Commit
c2262e4f
authored
Feb 20, 2022
by
Jean-Baptiste Mardelle
Browse files
Don't show clip thumbs on when clip is too small (<16 pixels).
Related to
#439
parent
11507b58
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/Clip.qml
View file @
c2262e4f
...
...
@@ -67,7 +67,7 @@ Rectangle {
property
color
borderColor
:
"
#000000
"
property
bool
forceReloadThumb
property
bool
isComposition
:
false
property
bool
hideClipViews
:
false
property
bool
hideClipViews
:
scrollStart
>
(
clipDuration
*
timeline
.
scaleFactor
)
||
scrollStart
+
scrollView
.
width
<
0
||
clipRoot
.
width
<
16
property
int
slipOffset
:
boundValue
(
outPoint
-
maxDuration
+
1
,
trimmingOffset
,
inPoint
)
property
int
scrollStart
:
scrollView
.
contentX
-
(
clipRoot
.
modelStart
*
timeline
.
scaleFactor
)
property
int
mouseXPos
:
mouseArea
.
mouseX
...
...
@@ -81,7 +81,6 @@ Rectangle {
signal
trimmedOut
(
var
clip
,
bool
shiftTrim
,
bool
controlTrim
)
onScrollStartChanged
:
{
clipRoot
.
hideClipViews
=
scrollStart
>
(
clipDuration
*
timeline
.
scaleFactor
)
||
scrollStart
+
scrollView
.
width
<
0
if
(
!
clipRoot
.
hideClipViews
&&
clipRoot
.
width
>
scrollView
.
width
)
{
if
(
effectRow
.
item
&&
effectRow
.
item
.
kfrCanvas
)
{
effectRow
.
item
.
kfrCanvas
.
requestPaint
()
...
...
@@ -359,7 +358,7 @@ Rectangle {
//clip: true
asynchronous
:
true
visible
:
status
==
Loader
.
Ready
source
:
clipRoot
.
hideClipViews
||
clipRoot
.
itemType
==
0
||
clipRoot
.
itemType
===
ProducerType
.
Color
?
""
:
parentTrack
.
isAudio
?
(
timeline
.
showAudioThumbnails
?
"
ClipAudioThumbs.qml
"
:
""
)
:
timeline
.
showThumbnails
?
"
ClipThumbs.qml
"
:
""
source
:
(
clipRoot
.
hideClipViews
||
clipRoot
.
itemType
==
0
||
clipRoot
.
itemType
===
ProducerType
.
Color
)
?
""
:
parentTrack
.
isAudio
?
(
timeline
.
showAudioThumbnails
?
"
ClipAudioThumbs.qml
"
:
""
)
:
timeline
.
showThumbnails
?
"
ClipThumbs.qml
"
:
""
}
Rectangle
{
...
...
src/timeline2/view/qml/ClipThumbs.qml
View file @
c2262e4f
...
...
@@ -30,7 +30,8 @@ Row {
// container.width / thumbRow.thumbWidth will display all frames showThumbnails
// 1: only show first thumbnail
// 0: will disable thumbnails
model
:
parentTrack
.
trackThumbsFormat
===
0
?
2
:
parentTrack
.
trackThumbsFormat
===
1
?
Math
.
ceil
(
container
.
width
/
thumbRow
.
thumbWidth
)
:
parentTrack
.
trackThumbsFormat
===
2
?
1
:
0
// Track trackThumbsFormat is: 2 = In frame only, 0 = in/out, 1 = All frames, 3 = No thumbs
model
:
parentTrack
.
trackThumbsFormat
===
0
?
(
container
.
width
>
thumbRow
.
thumbWidth
?
2
:
1
)
:
parentTrack
.
trackThumbsFormat
===
1
?
Math
.
ceil
(
container
.
width
/
thumbRow
.
thumbWidth
)
:
parentTrack
.
trackThumbsFormat
===
2
?
1
:
0
property
int
startFrame
:
clipRoot
.
inPoint
property
int
endFrame
:
clipRoot
.
outPoint
property
real
imageWidth
:
Math
.
max
(
thumbRow
.
thumbWidth
,
container
.
width
/
thumbRepeater
.
count
)
...
...
Write
Preview
Supports
Markdown
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