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
eb3c8212
Commit
eb3c8212
authored
Oct 21, 2019
by
Jean-Baptiste Mardelle
Browse files
Cleaner indication of in/out/markers on monitor
parent
ab4b6377
Pipeline
#9276
passed with stage
in 14 minutes and 11 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/monitor/monitor.cpp
View file @
eb3c8212
...
...
@@ -1127,10 +1127,11 @@ void Monitor::checkOverlay(int pos)
if
(
pos
==
-
1
)
{
pos
=
m_timePos
->
getValue
();
}
QPoint
zone
=
m_glMonitor
->
getControllerProxy
()
->
zone
();
std
::
shared_ptr
<
MarkerListModel
>
model
(
nullptr
);
if
(
m_id
==
Kdenlive
::
ClipMonitor
&&
m_controller
)
{
model
=
m_controller
->
getMarkerModel
();
if
(
m_id
==
Kdenlive
::
ClipMonitor
)
{
if
(
m_controller
)
{
model
=
m_controller
->
getMarkerModel
();
}
}
else
if
(
m_id
==
Kdenlive
::
ProjectMonitor
&&
pCore
->
currentDoc
())
{
model
=
pCore
->
currentDoc
()
->
getGuideModel
();
}
...
...
@@ -1138,13 +1139,7 @@ void Monitor::checkOverlay(int pos)
if
(
model
)
{
bool
found
=
false
;
CommentedTime
marker
=
model
->
getMarker
(
GenTime
(
pos
,
m_monitorManager
->
timecode
().
fps
()),
&
found
);
if
(
!
found
)
{
if
(
pos
==
zone
.
x
())
{
overlayText
=
i18n
(
"In Point"
);
}
else
if
(
pos
==
zone
.
y
()
-
1
)
{
overlayText
=
i18n
(
"Out Point"
);
}
}
else
{
if
(
found
)
{
overlayText
=
marker
.
comment
();
}
}
...
...
src/monitor/view/kdenliveclipmonitor.qml
View file @
eb3c8212
...
...
@@ -174,6 +174,54 @@ Item {
rightMargin
:
10
}
}
Label
{
id
:
inPoint
font
:
fixedFont
anchors
{
left
:
parent
.
left
bottom
:
parent
.
bottom
}
visible
:
root
.
showMarkers
&&
controller
.
position
==
controller
.
zoneIn
text
:
i18n
(
"
In Point
"
)
color
:
"
white
"
background
:
Rectangle
{
color
:
"
#228b22
"
}
height
:
marker
.
height
width
:
textMetricsIn
.
width
+
10
leftPadding
:
0
rightPadding
:
0
horizontalAlignment
:
TextInput
.
AlignHCenter
TextMetrics
{
id
:
textMetricsIn
font
:
inPoint
.
font
text
:
inPoint
.
text
}
}
Label
{
id
:
outPoint
font
:
fixedFont
anchors
{
left
:
inPoint
.
visible
?
inPoint
.
right
:
parent
.
left
bottom
:
parent
.
bottom
}
visible
:
root
.
showMarkers
&&
controller
.
position
+
1
==
controller
.
zoneOut
text
:
i18n
(
"
Out Point
"
)
color
:
"
white
"
background
:
Rectangle
{
color
:
"
#ff4500
"
}
width
:
textMetricsOut
.
width
+
10
height
:
marker
.
height
leftPadding
:
0
rightPadding
:
0
horizontalAlignment
:
TextInput
.
AlignHCenter
TextMetrics
{
id
:
textMetricsOut
font
:
outPoint
.
font
text
:
outPoint
.
text
}
}
TextField
{
id
:
marker
font
:
fixedFont
...
...
@@ -185,7 +233,7 @@ Item {
root
.
editCurrentMarker
()
}
anchors
{
left
:
parent
.
left
left
:
outPoint
.
visible
?
outPoint
.
right
:
inPoint
.
visible
?
inPoint
.
right
:
parent
.
left
bottom
:
parent
.
bottom
}
visible
:
root
.
showMarkers
&&
text
!=
""
...
...
@@ -193,11 +241,10 @@ Item {
width
:
textMetrics
.
width
+
10
horizontalAlignment
:
TextInput
.
AlignHCenter
background
:
Rectangle
{
color
:
controller
.
position
==
controller
.
zoneIn
?
"
#9900ff00
"
:
controller
.
position
==
controller
.
zoneOut
?
"
#99ff0000
"
:
"
#990000ff
"
color
:
"
#990000ff
"
}
color
:
"
white
"
leftPadding
:
0
rightPadding
:
0
padding
:
0
TextMetrics
{
id
:
textMetrics
...
...
src/monitor/view/kdenlivemonitor.qml
View file @
eb3c8212
...
...
@@ -147,36 +147,83 @@ Item {
rightMargin
:
10
}
}
TextFi
el
d
{
id
:
marker
Lab
el
{
id
:
inPoint
font
:
fixedFont
objectName
:
"
markertext
"
activeFocusOnPress
:
true
text
:
controller
.
markerComment
width
:
textMetrics
.
width
+
10
horizontalAlignment
:
TextInput
.
AlignHCenter
anchors
{
left
:
parent
.
left
bottom
:
parent
.
bottom
}
visible
:
root
.
showMarkers
&&
controller
.
position
==
controller
.
zoneIn
text
:
i18n
(
"
In Point
"
)
color
:
"
white
"
background
:
Rectangle
{
color
:
controller
.
position
==
controller
.
zoneIn
?
"
#9900ff00
"
:
controller
.
position
==
controller
.
zoneOut
?
"
#99ff0000
"
:
"
#990000ff
"
color
:
"
#228b22
"
}
height
:
marker
.
height
width
:
textMetricsIn
.
width
+
10
leftPadding
:
0
rightPadding
:
0
horizontalAlignment
:
TextInput
.
AlignHCenter
TextMetrics
{
id
:
textMetricsIn
font
:
inPoint
.
font
text
:
inPoint
.
text
}
}
Label
{
id
:
outPoint
font
:
fixedFont
anchors
{
left
:
inPoint
.
visible
?
inPoint
.
right
:
parent
.
left
bottom
:
parent
.
bottom
}
visible
:
root
.
showMarkers
&&
controller
.
position
+
1
==
controller
.
zoneOut
text
:
i18n
(
"
Out Point
"
)
color
:
"
white
"
background
:
Rectangle
{
color
:
"
#ff4500
"
}
width
:
textMetricsOut
.
width
+
10
height
:
marker
.
height
leftPadding
:
0
rightPadding
:
0
horizontalAlignment
:
TextInput
.
AlignHCenter
TextMetrics
{
id
:
textMetrics
font
:
marker
.
font
text
:
controller
.
markerCommen
t
id
:
textMetrics
Out
font
:
outPoint
.
font
text
:
outPoint
.
tex
t
}
}
TextField
{
id
:
marker
font
:
fixedFont
objectName
:
"
markertext
"
activeFocusOnPress
:
true
onEditingFinished
:
{
root
.
markerText
=
marker
.
displayText
marker
.
focus
=
false
root
.
editCurrentMarker
()
}
anchors
{
left
:
parent
.
left
left
:
outPoint
.
visible
?
outPoint
.
right
:
inPoint
.
visible
?
inPoint
.
right
:
parent
.
left
bottom
:
parent
.
bottom
}
visible
:
root
.
showMarkers
&&
text
!=
""
text
:
controller
.
markerComment
width
:
textMetrics
.
width
+
10
horizontalAlignment
:
TextInput
.
AlignHCenter
background
:
Rectangle
{
color
:
"
#990000ff
"
}
color
:
"
white
"
padding
:
0
TextMetrics
{
id
:
textMetrics
font
:
marker
.
font
text
:
controller
.
markerComment
}
maximumLength
:
25
}
}
...
...
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