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
1b68eb91
Commit
1b68eb91
authored
Aug 16, 2020
by
Sashmita Raghav
Browse files
Make subtitle text editable
parent
b550a1b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/timeline.qml
View file @
1b68eb91
...
...
@@ -1469,12 +1469,7 @@ Rectangle {
width
:
(
model
.
endframe
-
model
.
startframe
)
*
timeScale
height
:
tracksContainer
.
height
x
:
model
.
startframe
*
timeScale
;
color
:
'
steelblue
'
border
{
width
:
2
color
:
'
blue
'
}
Text
{
/*Text {
id: subtitleText
anchors.fill: parent
visible: true
...
...
@@ -1483,6 +1478,33 @@ Rectangle {
wrapMode: Text.WordWrap
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}*/
TextField
{
id
:
subtitleEdit
font
:
miniFont
activeFocusOnPress
:
true
onEditingFinished
:
{
subtitleEdit
.
focus
=
false
timeline
.
editSubtitle
(
subtitleBase
.
x
/
timeline
.
scaleFactor
,
subtitleEdit
.
displayText
,
(
subtitleBase
.
x
+
subtitleBase
.
width
)
/
timeline
.
scaleFactor
)
}
anchors
{
bottom
:
parent
.
bottom
}
visible
:
true
&&
text
!=
""
text
:
model
.
subtitle
height
:
subtitleBase
.
height
width
:
subtitleBase
.
width
wrapMode
:
TextField
.
WordWrap
horizontalAlignment
:
displayText
==
text
?
TextInput
.
AlignHCenter
:
TextInput
.
AlignLeft
background
:
Rectangle
{
color
:
'
yellow
'
border
{
width
:
1
color
:
'
orange
'
}
}
color
:
'
black
'
padding
:
0
}
}
}
...
...
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