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

Correctly update background of clip colors in timeline on color change

parent 20e91df1
......@@ -76,8 +76,10 @@ Rectangle {
}
onReloadThumbChanged: {
console.log('qml thb rld')
color = Qt.darker(getColor())
if (mltService === 'color') {
var newColor = getColor()
color = selected ? newColor : Qt.darker(newColor)
}
}
onTimeScaleChanged: {
......@@ -101,10 +103,13 @@ Rectangle {
function getColor() {
if (mltService === 'color') {
//console.log('clip color', clipResource, " / ", '#' + clipResource.substring(2, 8))
//console.log('clip color', clipResource, " / ", '#' + clipResource.substring(3, 9))
if (clipResource.length == 10) {
// 0xRRGGBBAA
return '#' + clipResource.substring(2, 8)
} else if (clipResource.length == 9) {
// 0xAARRGGBB
return '#' + clipResource.substring(3, 9)
}
}
return isAudio? '#445f5a' : '#416e8c'
......@@ -354,15 +359,7 @@ Rectangle {
states: [
State {
name: 'normal'
when: !clipRoot.selected
PropertyChanges {
target: clipRoot
z: 0
}
},
State {
name: 'selectedBlank'
when: clipRoot.selected
when: clipRoot.selected === false
PropertyChanges {
target: clipRoot
color: Qt.darker(getColor())
......@@ -370,7 +367,7 @@ Rectangle {
},
State {
name: 'selected'
when: clipRoot.selected
when: clipRoot.selected === true
PropertyChanges {
target: clipRoot
z: 1
......
......@@ -100,7 +100,7 @@ Column{
target: loader.item
property: "reloadThumb"
value: model.reloadThumb
when: loader.status == Loader.Ready && !loader.item.isComposition
when: loader.status == Loader.Ready && loader.item.isComposition === false
}
Binding {
target: loader.item
......@@ -151,6 +151,12 @@ Column{
value: model.name
when: loader.status == Loader.Ready
}
Binding {
target: loader.item
property: "clipResource"
value: model.resource
when: loader.status == Loader.Ready && !loader.item.isComposition
}
sourceComponent: {
if (model.isComposition) {
return compositionDelegate
......@@ -160,7 +166,6 @@ Column{
}
onLoaded: {
console.log('loaded clip: ', model.start)
item.clipResource= model.resource
item.clipId= model.item
item.binId= model.binId
item.isComposition= model.isComposition
......
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