Commit 71ba58f4 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

TImeline guides: add delimiter and highlight active one.

Related to #1141
parent 39494a12
...@@ -787,6 +787,8 @@ Rectangle { ...@@ -787,6 +787,8 @@ Rectangle {
width: label.width + (2 * clipRoot.border.width) width: label.width + (2 * clipRoot.border.width)
height: label.height height: label.height
visible: clipRoot.width > width / 2 visible: clipRoot.width > width / 2
anchors.left: parent.left
anchors.leftMargin: clipRoot.timeremap ? labelRect.width : 0
Text { Text {
// Clip name text // Clip name text
id: label id: label
...@@ -877,7 +879,7 @@ Rectangle { ...@@ -877,7 +879,7 @@ Rectangle {
width: labelRect.height width: labelRect.height
height: labelRect.height height: labelRect.height
anchors.top: labelRect.top anchors.top: labelRect.top
anchors.left: labelRect.right anchors.left: nameContainer.left
visible: !clipRoot.isAudio && clipRoot.clipStatus === ClipStatus.StatusProxy || clipRoot.clipStatus === ClipStatus.StatusProxyOnly visible: !clipRoot.isAudio && clipRoot.clipStatus === ClipStatus.StatusProxy || clipRoot.clipStatus === ClipStatus.StatusProxyOnly
Text { Text {
// Proxy P // Proxy P
......
...@@ -111,24 +111,35 @@ Item { ...@@ -111,24 +111,35 @@ Item {
delegate: delegate:
Item { Item {
id: guideRoot id: guideRoot
z: proxy.position == model.frame ? 20 : 10 property bool activated : proxy.position == model.frame
z: activated ? 20 : 10
Rectangle { Rectangle {
id: markerBase id: markerBase
width: 1 width: 1
height: rulerRoot.height height: rulerRoot.height
x: model.frame * timeline.scaleFactor x: model.frame * timeline.scaleFactor
color: model.color color: guideRoot.activated ? Qt.lighter(model.color, 1.3) : model.color
property int markerId: model.id property int markerId: model.id
Rectangle { Rectangle {
visible: timeline.showMarkers visible: timeline.showMarkers
width: mlabel.contentWidth + 4 width: mlabel.contentWidth + 4
height: guideLabelHeight height: guideLabelHeight
radius: timeline.guidesLocked ? 0 : height / 4 radius: timeline.guidesLocked ? 0 : height / 4
color: markerBase.color
anchors { anchors {
top: parent.top top: parent.top
left: parent.left left: parent.left
} }
color: model.color Rectangle {
// Shadow delimiting marker start
width: 1
height: guideLabelHeight
color: activePalette.dark
anchors {
right: parent.left
}
}
Text { Text {
id: mlabel id: mlabel
text: model.comment text: model.comment
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment