Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
a03c4f9a
Commit
a03c4f9a
authored
Jul 11, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some improvments to timeline tooltips
parent
ff1fa2fd
Pipeline
#5165
passed with stage
in 16 minutes and 5 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
22 deletions
+61
-22
src/timeline2/view/qml/Clip.qml
src/timeline2/view/qml/Clip.qml
+34
-4
src/timeline2/view/qml/Track.qml
src/timeline2/view/qml/Track.qml
+14
-12
src/timeline2/view/qml/timeline.qml
src/timeline2/view/qml/timeline.qml
+3
-6
src/timeline2/view/timelinecontroller.cpp
src/timeline2/view/timelinecontroller.cpp
+9
-0
src/timeline2/view/timelinecontroller.h
src/timeline2/view/timelinecontroller.h
+1
-0
No files found.
src/timeline2/view/qml/Clip.qml
View file @
a03c4f9a
...
...
@@ -114,7 +114,7 @@ Rectangle {
}
contentItem
:
Label
{
color
:
activePalette
.
text
text
:
label
.
text
+
'
(
'
+
timeline
.
timecode
(
clipRoot
.
inPoint
)
+
'
-
'
+
timeline
.
timecode
(
clipRoot
.
outPoint
)
+
'
)
'
text
:
label
.
text
+
'
(
'
+
timeline
.
simplifiedTC
(
clipRoot
.
inPoint
)
+
'
-
'
+
timeline
.
simplifiedTC
(
clipRoot
.
outPoint
)
+
'
)
'
}
}
...
...
@@ -364,7 +364,7 @@ Rectangle {
}
contentItem
:
Label
{
color
:
activePalette
.
text
text
:
positionOffset
<
0
?
i18n
(
"
Offset: -%1
"
,
timeline
.
timecode
(
-
positionOffset
))
:
i18n
(
"
Offset: %1
"
,
timeline
.
timecode
(
positionOffset
))
text
:
positionOffset
<
0
?
i18n
(
"
Offset: -%1
"
,
timeline
.
simplifiedTC
(
-
positionOffset
))
:
i18n
(
"
Offset: %1
"
,
timeline
.
simplifiedTC
(
positionOffset
))
}
}
Text
{
...
...
@@ -673,7 +673,7 @@ Rectangle {
if
(
duration
!=
clipRoot
.
fadeIn
)
{
timeline
.
adjustFade
(
clipRoot
.
clipId
,
'
fadein
'
,
duration
,
-
1
)
// Show fade duration as time in a "bubble" help.
var
s
=
timeline
.
timecode
(
Math
.
max
(
duration
,
0
))
var
s
=
timeline
.
simplifiedTC
(
Math
.
max
(
duration
,
0
))
bubbleHelp
.
show
(
clipRoot
.
x
,
parentTrack
.
y
+
clipRoot
.
height
,
s
)
}
}
...
...
@@ -774,7 +774,7 @@ Rectangle {
if
(
clipRoot
.
fadeOut
!=
duration
)
{
timeline
.
adjustFade
(
clipRoot
.
clipId
,
'
fadeout
'
,
duration
,
-
1
)
// Show fade duration as time in a "bubble" help.
var
s
=
timeline
.
timecode
(
Math
.
max
(
duration
,
0
))
var
s
=
timeline
.
simplifiedTC
(
Math
.
max
(
duration
,
0
))
bubbleHelp
.
show
(
clipRoot
.
x
+
clipRoot
.
width
,
parentTrack
.
y
+
clipRoot
.
height
,
s
)
}
}
...
...
@@ -812,6 +812,21 @@ Rectangle {
Drag.proposedAction
:
Qt
.
MoveAction
visible
:
trimInMouseArea
.
pressed
||
(
root
.
activeTool
===
0
&&
!
mouseArea
.
drag
.
active
&&
clipRoot
.
width
>
4
*
width
)
ToolTip
{
visible
:
trimInMouseArea
.
containsMouse
&&
!
trimInMouseArea
.
pressed
font.pixelSize
:
root
.
baseUnit
delay
:
1000
timeout
:
5000
background
:
Rectangle
{
color
:
activePalette
.
alternateBase
border.color
:
activePalette
.
light
}
contentItem
:
Label
{
color
:
activePalette
.
text
text
:
i18n
(
"
In:%1
\n
Position:%2
"
,
timeline
.
simplifiedTC
(
clipRoot
.
inPoint
),
timeline
.
simplifiedTC
(
clipRoot
.
modelStart
))
}
}
MouseArea
{
id
:
trimInMouseArea
anchors.fill
:
parent
...
...
@@ -879,6 +894,21 @@ Rectangle {
Drag.proposedAction
:
Qt
.
MoveAction
visible
:
trimOutMouseArea
.
pressed
||
(
root
.
activeTool
===
0
&&
!
mouseArea
.
drag
.
active
&&
clipRoot
.
width
>
4
*
width
)
ToolTip
{
visible
:
trimOutMouseArea
.
containsMouse
&&
!
trimOutMouseArea
.
pressed
font.pixelSize
:
root
.
baseUnit
delay
:
1000
timeout
:
5000
background
:
Rectangle
{
color
:
activePalette
.
alternateBase
border.color
:
activePalette
.
light
}
contentItem
:
Label
{
color
:
activePalette
.
text
text
:
i18n
(
"
Out:
"
)
+
timeline
.
simplifiedTC
(
clipRoot
.
outPoint
)
}
}
MouseArea
{
id
:
trimOutMouseArea
anchors.fill
:
parent
...
...
src/timeline2/view/qml/Track.qml
View file @
a03c4f9a
...
...
@@ -285,10 +285,11 @@ Column{
clip
.
originalX
=
clip
.
draggedX
// Show amount trimmed as a time in a "bubble" help.
var
delta
=
new_duration
-
clip
.
originalDuration
var
s
=
timeline
.
timecode
(
Math
.
abs
(
delta
))
s
=
'
%1%2
= %3
'
.
arg
((
delta
<
0
)?
'
+
'
:
(
delta
>
0
)?
'
-
'
:
'
'
)
var
s
=
timeline
.
simplifiedTC
(
Math
.
abs
(
delta
))
s
=
'
%1%2
\n
%3:%4
'
.
arg
((
delta
<=
0
)?
'
+
'
:
'
-
'
)
.
arg
(
s
)
.
arg
(
timeline
.
timecode
(
clipDuration
))
.
arg
(
i18n
(
"
In
"
))
.
arg
(
timeline
.
simplifiedTC
(
clip
.
inPoint
))
bubbleHelp
.
show
(
clip
.
x
-
20
,
trackRoot
.
y
+
trackRoot
.
height
,
s
)
}
}
...
...
@@ -327,10 +328,11 @@ Column{
clip
.
lastValidDuration
=
new_duration
// Show amount trimmed as a time in a "bubble" help.
var
delta
=
clip
.
originalDuration
-
new_duration
var
s
=
timeline
.
timecode
(
Math
.
abs
(
delta
))
s
=
'
%1%2
= %3
'
.
arg
((
delta
<
0
)?
'
+
'
:
(
delta
>
0
)?
'
-
'
:
'
'
)
var
s
=
timeline
.
simplifiedTC
(
Math
.
abs
(
delta
))
s
=
'
%1%2
\n
%3:%4
'
.
arg
((
delta
<=
0
)?
'
+
'
:
'
-
'
)
.
arg
(
s
)
.
arg
(
timeline
.
timecode
(
new_duration
))
.
arg
(
i18n
(
"
Duration
"
))
.
arg
(
timeline
.
simplifiedTC
(
new_duration
))
bubbleHelp
.
show
(
clip
.
x
+
clip
.
width
-
20
,
trackRoot
.
y
+
trackRoot
.
height
,
s
)
}
}
...
...
@@ -368,10 +370,10 @@ Column{
clip
.
originalX
=
clip
.
draggedX
// Show amount trimmed as a time in a "bubble" help.
var
delta
=
newDuration
-
clip
.
originalDuration
var
s
=
timeline
.
timecode
(
Math
.
abs
(
delta
))
s
=
'
%1%2 = %3
'
.
arg
((
delta
<
0
)?
'
+
'
:
(
delta
>
0
)?
'
-
'
:
'
'
)
var
s
=
timeline
.
simplifiedTC
(
Math
.
abs
(
delta
))
s
=
'
%1%2 = %3
'
.
arg
((
delta
<
=
0
)?
'
+
'
:
'
-
'
)
.
arg
(
s
)
.
arg
(
timeline
.
timecode
(
clipDuration
))
.
arg
(
timeline
.
simplifiedTC
(
clipDuration
))
bubbleHelp
.
show
(
clip
.
x
+
clip
.
width
,
trackRoot
.
y
+
trackRoot
.
height
,
s
)
}
}
...
...
@@ -386,10 +388,10 @@ Column{
clip
.
lastValidDuration
=
newDuration
// Show amount trimmed as a time in a "bubble" help.
var
delta
=
newDuration
-
clip
.
originalDuration
var
s
=
timeline
.
timecode
(
Math
.
abs
(
delta
))
s
=
'
%1%2 = %3
'
.
arg
((
delta
<
0
)?
'
+
'
:
(
delta
>
0
)?
'
-
'
:
'
'
)
var
s
=
timeline
.
simplifiedTC
(
Math
.
abs
(
delta
))
s
=
'
%1%2 = %3
'
.
arg
((
delta
<
=
0
)?
'
+
'
:
'
-
'
)
.
arg
(
s
)
.
arg
(
timeline
.
timecode
(
clipDuration
))
.
arg
(
timeline
.
simplifiedTC
(
clipDuration
))
bubbleHelp
.
show
(
clip
.
x
+
clip
.
width
,
trackRoot
.
y
+
trackRoot
.
height
,
s
)
}
}
...
...
src/timeline2/view/qml/timeline.qml
View file @
a03c4f9a
...
...
@@ -1227,12 +1227,9 @@ Rectangle {
}
var
delta
=
dragFrame
-
dragProxy
.
sourceFrame
if
(
delta
!=
0
)
{
var
s
=
timeline
.
timecode
(
Math
.
abs
(
delta
))
// remove leading zeroes
if
(
s
.
substring
(
0
,
3
)
===
'
00:
'
)
s
=
s
.
substring
(
3
)
s
=
((
delta
<
0
)?
'
-
'
:
(
delta
>
0
)?
'
+
'
:
''
)
+
s
bubbleHelp
.
show
(
parent
.
x
,
ruler
.
height
,
s
)
var
s
=
timeline
.
simplifiedTC
(
Math
.
abs
(
delta
))
s
=
((
delta
<
0
)?
'
-
'
:
'
+
'
)
+
s
+
i18n
(
"
\n
Position:%1
"
,
timeline
.
simplifiedTC
(
dragFrame
))
bubbleHelp
.
show
(
parent
.
x
+
mouseX
,
Math
.
max
(
ruler
.
height
,
Logic
.
getTrackYFromId
(
timeline
.
activeTrack
)),
s
)
}
else
bubbleHelp
.
hide
()
}
}
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
a03c4f9a
...
...
@@ -484,6 +484,15 @@ QString TimelineController::timecode(int frames)
return
KdenliveSettings
::
frametimecode
()
?
QString
::
number
(
frames
)
:
m_model
->
tractor
()
->
frames_to_time
(
frames
,
mlt_time_smpte_df
);
}
QString
TimelineController
::
simplifiedTC
(
int
frames
)
{
if
(
KdenliveSettings
::
frametimecode
())
{
return
QString
::
number
(
frames
);
}
QString
s
=
m_model
->
tractor
()
->
frames_to_time
(
frames
,
mlt_time_smpte_df
);
return
s
.
startsWith
(
QLatin1String
(
"00:"
))
?
s
.
remove
(
0
,
3
)
:
s
;
}
bool
TimelineController
::
showThumbnails
()
const
{
return
KdenliveSettings
::
videothumbnails
();
...
...
src/timeline2/view/timelinecontroller.h
View file @
a03c4f9a
...
...
@@ -164,6 +164,7 @@ public:
Q_INVOKABLE
bool
ripple
();
Q_INVOKABLE
bool
scrub
();
Q_INVOKABLE
QString
timecode
(
int
frames
);
Q_INVOKABLE
QString
simplifiedTC
(
int
frames
);
/* @brief Request inserting a new clip in timeline (dragged from bin or monitor)
@param tid is the destination track
@param position is the timeline position
...
...
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