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

Small adjusmtent to 1 click composition and fades (don't show when clips are small due to zoom out)

parent b69ca6ac
Pipeline #1767 passed with stage
in 15 minutes and 2 seconds
......@@ -432,9 +432,9 @@ Rectangle {
id: compositionIn
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.bottomMargin: 4
anchors.bottomMargin: 2
anchors.leftMargin: 4
width: root.baseUnit * 1.5
width: root.baseUnit * 1.2
height: width
radius: 2
color: Qt.darker('mediumpurple')
......@@ -442,6 +442,7 @@ Rectangle {
border.color: 'green'
opacity: 0
enabled: !clipRoot.isAudio && !dragProxy.isComposition
visible: clipRoot.width > 4 * width
MouseArea {
id: compInArea
anchors.fill: parent
......@@ -456,6 +457,9 @@ Rectangle {
onPressed: {
timeline.addCompositionToClip('', clipRoot.clipId, 0)
}
onReleased: {
parent.opacity = 0
}
ToolTip {
visible: compInArea.containsMouse && !dragProxyArea.pressed
font.pixelSize: root.baseUnit
......@@ -476,9 +480,9 @@ Rectangle {
id: compositionOut
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 4
anchors.bottomMargin: 2
anchors.rightMargin: 4
width: root.baseUnit * 1.5
width: root.baseUnit * 1.2
height: width
radius: 2
color: Qt.darker('mediumpurple')
......@@ -486,6 +490,7 @@ Rectangle {
border.color: 'green'
opacity: 0
enabled: !clipRoot.isAudio
visible: clipRoot.width > 4 * width
MouseArea {
id: compOutArea
anchors.fill: parent
......@@ -493,16 +498,18 @@ Rectangle {
cursorShape: Qt.PointingHandCursor
onEntered: {
parent.opacity = 0.7
parent.visible = true
}
onExited: {
parent.opacity = 0
parent.visible = false
if (!pressed) {
parent.opacity = 0
}
}
onPressed: {
parent.visible = false
timeline.addCompositionToClip('', clipRoot.clipId, clipRoot.clipDuration - 1)
}
onReleased: {
parent.opacity = 0
}
ToolTip {
visible: compOutArea.containsMouse && !dragProxyArea.pressed
font.pixelSize: root.baseUnit
......@@ -545,6 +552,7 @@ Rectangle {
border.color: 'green'
enabled: !isLocked && !dragProxy.isComposition
opacity: 0
visible : clipRoot.width > 3 * width
Drag.active: fadeInMouseArea.drag.active
MouseArea {
id: fadeInMouseArea
......@@ -644,6 +652,7 @@ Rectangle {
opacity: 0
enabled: !isLocked && !dragProxy.isComposition
Drag.active: fadeOutMouseArea.drag.active
visible : clipRoot.width > 3 * width
MouseArea {
id: fadeOutMouseArea
anchors.fill: parent
......
......@@ -183,7 +183,7 @@ Item {
anchors.left: compositionRoot.left
anchors.topMargin: displayHeight * 1.2
height: displayHeight * 1.3
color: Qt.darker('mediumpurple')
color: selected ? 'mediumpurple' : Qt.darker('mediumpurple')
border.color: selected ? activePalette.highlight : grouped ? root.groupColor : borderColor
border.width: isGrabbed ? 8 : 1.5
opacity: dragProxyArea.drag.active && dragProxy.draggedItem == clipId ? 0.5 : 1.0
......
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