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
1093294c
Commit
1093294c
authored
Feb 22, 2022
by
Jean-Baptiste Mardelle
Browse files
Show clip labels as soon as there is one letter width
Fixes
#1339
parent
6aa79cbc
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/Clip.qml
View file @
1093294c
...
...
@@ -67,7 +67,7 @@ Rectangle {
property
color
borderColor
:
"
#000000
"
property
bool
forceReloadThumb
property
bool
isComposition
:
false
property
bool
hideClipViews
:
scrollStart
>
(
clipDuration
*
timeline
.
scaleFactor
)
||
scrollStart
+
scrollView
.
width
<
0
||
clipRoot
.
width
<
16
property
bool
hideClipViews
:
scrollStart
>
(
clipDuration
*
timeline
.
scaleFactor
)
||
scrollStart
+
scrollView
.
width
<
0
||
clipRoot
.
width
<
root
.
minClipWidthForViews
property
int
slipOffset
:
boundValue
(
outPoint
-
maxDuration
+
1
,
trimmingOffset
,
inPoint
)
property
int
scrollStart
:
scrollView
.
contentX
-
(
clipRoot
.
modelStart
*
timeline
.
scaleFactor
)
property
int
mouseXPos
:
mouseArea
.
mouseX
...
...
@@ -847,7 +847,7 @@ Rectangle {
color
:
clipRoot
.
selected
?
'
darkred
'
:
'
#66000000
'
width
:
label
.
width
+
(
2
*
itemBorder
.
border
.
width
)
height
:
label
.
height
visible
:
clipRoot
.
width
>
width
/
2
visible
:
clipRoot
.
width
>
root
.
baseUnit
anchors.left
:
parent
.
left
anchors.leftMargin
:
clipRoot
.
timeremap
?
labelRect
.
height
:
0
Text
{
...
...
src/timeline2/view/qml/Composition.qml
View file @
1093294c
...
...
@@ -46,7 +46,7 @@ Item {
property
double
speed
:
1.0
property
color
color
:
displayRect
.
color
property
color
borderColor
:
'
black
'
property
bool
hideCompoViews
property
bool
hideCompoViews
:
scrollStart
>
(
clipDuration
*
timeline
.
scaleFactor
)
||
scrollStart
+
scrollView
.
width
<
0
||
width
<
root
.
minClipWidthForViews
property
int
scrollStart
:
scrollView
.
contentX
-
modelStart
*
timeline
.
scaleFactor
property
int
mouseXPos
:
mouseArea
.
mouseX
...
...
@@ -60,7 +60,6 @@ Item {
signal
trimmedOut
(
var
clip
)
onScrollStartChanged
:
{
compositionRoot
.
hideCompoViews
=
compositionRoot
.
scrollStart
>
width
||
compositionRoot
.
scrollStart
+
scrollView
.
width
<
0
if
(
!
compositionRoot
.
hideClipViews
&&
compositionRoot
.
width
>
scrollView
.
width
)
{
if
(
effectRow
.
item
&&
effectRow
.
item
.
kfrCanvas
)
{
effectRow
.
item
.
kfrCanvas
.
requestPaint
()
...
...
@@ -391,6 +390,7 @@ Item {
// text background
id
:
labelRect
color
:
compositionRoot
.
aTrack
>
-
1
?
'
yellow
'
:
'
lightgray
'
visible
:
compositionRoot
.
width
>
root
.
baseUnit
width
:
label
.
width
+
2
height
:
label
.
height
Text
{
...
...
src/timeline2/view/qml/timeline.qml
View file @
1093294c
...
...
@@ -369,7 +369,8 @@ Rectangle {
}
property
int
activeTool
:
ProjectTool
.
SelectTool
property
real
baseUnit
:
Math
.
max
(
12
,
fontMetrics
.
font
.
pixelSize
)
property
int
baseUnit
:
Math
.
max
(
12
,
fontMetrics
.
font
.
pixelSize
)
property
int
minClipWidthForViews
:
1.5
*
baseUnit
property
real
fontUnit
:
fontMetrics
.
font
.
pointSize
property
int
collapsedHeight
:
Math
.
max
(
28
,
baseUnit
*
1.8
)
property
int
minHeaderWidth
:
6
*
collapsedHeight
...
...
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