Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

qml timeline: hide blanks

parent 9cb56c85
......@@ -185,8 +185,7 @@ QVariant TimelineModel::data(const QModelIndex &index, int role) const
return QString("service2");
break;
case IsBlankRole:
return false;
//return playlist.is_blank(index.row());
return playlist.is_blank(index.row());
case StartRole:
return info->start;
case DurationRole:
......
......@@ -56,18 +56,7 @@ Rectangle {
signal trimmedOut(var clip)
SystemPalette { id: activePalette }
gradient: Gradient {
GradientStop {
id: gradientStop
position: 0.00
color: Qt.lighter(getColor())
}
GradientStop {
id: gradientStop2
position: 1.0
color: getColor()
}
}
color: Qt.darker(getColor())
border.color: selected? 'red' : 'black'
border.width: isBlank? 0 : 1
......@@ -144,7 +133,7 @@ Rectangle {
Row {
id: waveform
//visible: !isBlank && settings.timelineShowWaveforms
visible: !isBlank //&& settings.timelineShowWaveforms
height: isAudio? parent.height : parent.height / 2
anchors.left: parent.left
anchors.bottom: parent.bottom
......@@ -222,12 +211,8 @@ Rectangle {
name: 'selectedBlank'
when: clipRoot.selected && clipRoot.isBlank
PropertyChanges {
target: gradientStop2
color: Qt.lighter(selectedTrackColor)
}
PropertyChanges {
target: gradientStop
color: Qt.darker(selectedTrackColor)
target: clipRoot
color: Qt.darker(getColor())
}
},
State {
......@@ -236,10 +221,7 @@ Rectangle {
PropertyChanges {
target: clipRoot
z: 1
}
PropertyChanges {
target: gradientStop
color: Qt.darker(getColor())
color: getColor()
}
}
]
......@@ -294,10 +276,10 @@ Rectangle {
anchors.fill: parent
acceptedButtons: Qt.RightButton
propagateComposedEvents: true
/*cursorShape: (trimInMouseArea.drag.active || trimOutMouseArea.drag.active)? Qt.SizeHorCursor :
cursorShape: (trimInMouseArea.drag.active || trimOutMouseArea.drag.active)? Qt.SizeHorCursor :
(fadeInMouseArea.drag.active || fadeOutMouseArea.drag.active)? Qt.PointingHandCursor :
drag.active? Qt.ClosedHandCursor :
isBlank? Qt.ArrowCursor : Qt.OpenHandCursor*/
isBlank? Qt.ArrowCursor : Qt.OpenHandCursor
onClicked: menu.show()
}
}
......
......@@ -38,6 +38,7 @@ Rectangle {
signal clipDraggedToTrack(var clip, int direction)
signal checkSnap(var clip)
color: 'transparent'
function redrawWaveforms() {
for (var i = 0; i < repeater.count; i++)
......@@ -56,7 +57,6 @@ Rectangle {
return repeater.itemAt(index)
}
color: 'transparent'
width: clipRow.width
DelegateModel {
......@@ -68,7 +68,7 @@ Rectangle {
mltService: model.mlt_service
inPoint: model.in
outPoint: model.out
isBlank: false //model.blank
isBlank: model.blank
isAudio: false //model.audio
isTransition: false //model.isTransition
audioLevels: false //model.audioLevels
......
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