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
32136296
Commit
32136296
authored
Feb 28, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken timeline header position in some cases
parent
2e0fbcd8
Pipeline
#15745
passed with stage
in 16 minutes and 16 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
src/timeline2/view/qml/TrackHead.qml
src/timeline2/view/qml/TrackHead.qml
+5
-7
src/timeline2/view/qml/timeline.qml
src/timeline2/view/qml/timeline.qml
+6
-6
No files found.
src/timeline2/view/qml/TrackHead.qml
View file @
32136296
...
...
@@ -38,10 +38,8 @@ Rectangle {
property
int
iconSize
:
buttonSize
-
4
property
string
trackTag
property
int
thumbsFormat
:
0
property
int
collapsedHeight
:
buttonSize
border.width
:
1
border.color
:
root
.
frameColor
signal
clicked
()
function
pulseLockButton
()
{
flashLock
.
restart
();
...
...
@@ -82,7 +80,7 @@ Rectangle {
anchors.fill
:
parent
acceptedButtons
:
Qt
.
LeftButton
|
Qt
.
RightButton
onPressed
:
{
parent
.
clicked
()
timeline
.
activeTrack
=
trackId
if
(
mouse
.
button
==
Qt
.
RightButton
)
{
root
.
showHeaderMenu
()
}
...
...
@@ -197,7 +195,7 @@ Rectangle {
//icon.height: trackHeadRoot.iconSize
icon.name
:
trackHeadRoot
.
collapsed
?
'
arrow-right
'
:
'
arrow-down
'
onClicked
:
{
trackHeadRoot
.
myTrackHeight
=
trackHeadRoot
.
collapsed
?
Math
.
max
(
collapsedHeight
*
1.5
,
controller
.
getTrackProperty
(
trackId
,
"
kdenlive:trackheight
"
))
:
collapsedHeight
trackHeadRoot
.
myTrackHeight
=
trackHeadRoot
.
collapsed
?
Math
.
max
(
root
.
collapsedHeight
*
1.5
,
controller
.
getTrackProperty
(
trackId
,
"
kdenlive:trackheight
"
))
:
root
.
collapsedHeight
}
ToolTip
{
visible
:
expandButton
.
hovered
...
...
@@ -419,7 +417,7 @@ Rectangle {
}
onClicked
:
{
timeline
.
showTrackAsset
(
trackId
)
t
rackHeadRoot
.
clicked
()
t
imeline
.
activeTrack
=
trackId
trackHeadRoot
.
focus
=
true
}
onEntered
:
{
...
...
@@ -497,7 +495,7 @@ Rectangle {
cursorShape
:
Qt
.
SizeVerCursor
drag.target
:
parent
drag.axis
:
Drag
.
YAxis
drag.minimumY
:
trackHeadR
oot
.
collapsedHeight
-
resizer
.
height
drag.minimumY
:
r
oot
.
collapsedHeight
-
resizer
.
height
property
double
startY
property
double
originalY
drag.smoothed
:
false
...
...
@@ -522,7 +520,7 @@ Rectangle {
if
(
mouse
.
buttons
===
Qt
.
LeftButton
)
{
parent
.
opacity
=
0.5
var
newHeight
=
originalY
+
(
mapToItem
(
null
,
x
,
y
).
y
-
startY
)
newHeight
=
Math
.
max
(
trackHeadR
oot
.
collapsedHeight
,
newHeight
)
newHeight
=
Math
.
max
(
r
oot
.
collapsedHeight
,
newHeight
)
trackHeadRoot
.
myTrackHeight
=
newHeight
}
}
...
...
src/timeline2/view/qml/timeline.qml
View file @
32136296
...
...
@@ -265,6 +265,7 @@ Rectangle {
property
int
scrollMin
:
scrollView
.
contentX
/
timeline
.
scaleFactor
property
int
scrollMax
:
scrollMin
+
scrollView
.
contentItem
.
width
/
timeline
.
scaleFactor
property
double
dar
:
16
/
9
property
int
collapsedHeight
:
baseUnit
*
1.8
onSeekingFinishedChanged
:
{
playhead
.
opacity
=
seekingFinished
?
1
:
0.5
...
...
@@ -296,7 +297,10 @@ Rectangle {
if
(
tk
.
y
<
scrollView
.
contentY
)
{
scrollView
.
contentY
=
Math
.
max
(
0
,
tk
.
y
-
scrollView
.
height
/
3
)
}
else
if
(
tk
.
y
+
tk
.
height
>
scrollView
.
contentY
+
scrollView
.
contentItem
.
height
)
{
scrollView
.
contentY
=
Math
.
min
(
trackHeaders
.
height
-
scrollView
.
height
+
scrollView
.
ScrollBar
.
horizontal
.
height
,
tk
.
y
-
scrollView
.
height
/
3
)
var
newY
=
Math
.
min
(
trackHeaders
.
height
-
scrollView
.
height
+
scrollView
.
ScrollBar
.
horizontal
.
height
,
tk
.
y
-
scrollView
.
height
/
3
)
if
(
newY
>=
0
)
{
scrollView
.
contentY
=
newY
}
}
}
...
...
@@ -668,10 +672,6 @@ Rectangle {
// hack: change property to trigger transition adjustment
root
.
trackHeight
=
root
.
trackHeight
===
1
?
0
:
1
}
onClicked
:
{
timeline
.
activeTrack
=
tracksRepeater
.
itemAt
(
index
).
trackInternalId
console
.
log
(
'
track name:
'
,
index
,
'
=
'
,
model
.
name
,
'
/
'
,
tracksRepeater
.
itemAt
(
index
).
trackInternalId
)
}
}
}
}
...
...
@@ -1165,7 +1165,7 @@ Rectangle {
width
:
tracksContainerArea
.
width
border.width
:
1
border.color
:
root
.
frameColor
height
:
Math
.
max
(
root
.
baseUnit
*
2
,
model
.
trackHeight
)
height
:
Math
.
max
(
collapsedHeight
,
model
.
trackHeight
)
color
:
tracksRepeater
.
itemAt
(
index
)
?
((
tracksRepeater
.
itemAt
(
index
).
trackInternalId
===
timeline
.
activeTrack
)
?
Qt
.
tint
(
getTrackColor
(
tracksRepeater
.
itemAt
(
index
).
isAudio
,
false
),
selectedTrackColor
)
:
getTrackColor
(
tracksRepeater
.
itemAt
(
index
).
isAudio
,
false
))
:
'
red
'
}
}
...
...
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