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
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
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
f1de3703
Commit
f1de3703
authored
Aug 16, 2020
by
Sashmita Raghav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make subtitle end position editable
parent
05e67c2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
1 deletion
+53
-1
src/timeline2/view/qml/timeline.qml
src/timeline2/view/qml/timeline.qml
+53
-1
No files found.
src/timeline2/view/qml/timeline.qml
View file @
f1de3703
...
...
@@ -1464,9 +1464,10 @@ Rectangle {
id
:
subtitleRoot
visible
:
true
z
:
20
property
int
duration
:
(
model
.
endframe
-
model
.
startframe
)
*
timeScale
Rectangle
{
id
:
subtitleStartBase
width
:
(
model
.
endframe
-
model
.
startframe
)
*
timeScale
width
:
duration
height
:
tracksContainer
.
height
x
:
model
.
startframe
*
timeScale
;
/*Text {
...
...
@@ -1506,6 +1507,57 @@ Rectangle {
color
:
'
black
'
padding
:
0
}
Rectangle
{
// end position resize handle
id
:
rightend
width
:
4
height
:
parent
.
height
anchors.right
:
subtitleBase
.
right
anchors.top
:
subtitleBase
.
top
color
:
'
blue
'
// to distinguish the resize handle
Drag.active
:
endMouseArea
.
drag
.
active
Drag.proposedAction
:
Qt
.
MoveAction
visible
:
true
MouseArea
{
id
:
endMouseArea
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
height
:
parent
.
height
width
:
4
hoverEnabled
:
true
enabled
:
pressed
property
bool
sizeChanged
:
false
property
int
newEnd
:
-
1
property
int
oldMouseX
cursorShape
:
Qt
.
SizeHorCursor
drag.target
:
rightend
drag.axis
:
Drag
.
XAxis
drag.smoothed
:
false
onPressed
:
{
root
.
autoScrolling
=
false
anchors
.
right
=
undefined
oldMouseX
=
mouseX
}
onPositionChanged
:
{
if
(
pressed
)
{
newEnd
=
Math
.
round
((
mouseX
+
width
)
/
timeScale
)
if
(
mouseX
!=
oldMouseX
)
{
sizeChanged
=
true
duration
=
duration
+
(
mouseX
-
oldMouseX
)
/
timeScale
}
}
}
onReleased
:
{
root
.
autoScrolling
=
timeline
.
autoScroll
//anchors.right = parent.right
if
(
mouseX
!=
oldMouseX
||
sizeChanged
)
{
timeline
.
editSubtitle
(
subtitleBase
.
x
/
timeline
.
scaleFactor
,
subtitleEdit
.
displayText
,
newEnd
)
}
}
}
}
}
}
}
...
...
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