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
32136296
Commit
32136296
authored
Feb 28, 2020
by
Jean-Baptiste Mardelle
Browse files
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
Hide whitespace changes
Inline
Side-by-side
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
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