"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/qml/modules/Shotcut/Controls/RectangleControl.qml" between
shotcut-20.09.01.tar.gz and shotcut-20.09.13.tar.gz

About: Shotcut is a cross-platform (Qt) advanced video editor.

RectangleControl.qml  (shotcut-20.09.01):RectangleControl.qml  (shotcut-20.09.13)
skipping to change at line 37 skipping to change at line 37
property int handleSize: 10 property int handleSize: 10
property int borderSize: 2 property int borderSize: 2
property alias rectangle: rectangle property alias rectangle: rectangle
property color handleColor: Qt.rgba(1, 1, 1, enabled? 0.9 : 0.2) property color handleColor: Qt.rgba(1, 1, 1, enabled? 0.9 : 0.2)
property int snapMargin: 10 property int snapMargin: 10
property alias withRotation: rotationHandle.visible property alias withRotation: rotationHandle.visible
property alias rotation: rotationGroup.rotation property alias rotation: rotationGroup.rotation
property bool _positionDragLocked: false property bool _positionDragLocked: false
signal rectChanged(Rectangle rect) signal rectChanged(Rectangle rect)
signal rotated(real degrees) signal rotated(real degrees, var mouse)
signal rotationReleased()
function setHandles(rect) { function setHandles(rect) {
if ( rect.width < 0 || rect.height < 0) if ( rect.width < 0 || rect.height < 0)
return return
topLeftHandle.x = (rect.x * widthScale) topLeftHandle.x = (rect.x * widthScale)
topLeftHandle.y = (rect.y * heightScale) topLeftHandle.y = (rect.y * heightScale)
if (aspectRatio === 0.0) { if (aspectRatio === 0.0) {
bottomRightHandle.x = topLeftHandle.x + (rect.width * widthScale) - handleSize bottomRightHandle.x = topLeftHandle.x + (rect.width * widthScale) - handleSize
bottomRightHandle.y = topLeftHandle.y + (rect.height * heightScale) - handleSize bottomRightHandle.y = topLeftHandle.y + (rect.height * heightScale) - handleSize
} else if (aspectRatio > 1.0) { } else if (aspectRatio > 1.0) {
skipping to change at line 255 skipping to change at line 256
radians += 2 * Math.PI radians += 2 * Math.PI
return 180 / Math.PI * radians return 180 / Math.PI * radians
} }
onPressed: { onPressed: {
parent.anchors.centerIn = undefined parent.anchors.centerIn = undefined
startRotation = rotationGroup.rotation startRotation = rotationGroup.rotation
} }
onPositionChanged: { onPositionChanged: {
var degrees = getRotationDegrees() var degrees = getRotationDegrees()
rotated(startRotation + degrees) rotated(startRotation + degrees, mouse)
rotationLine.rotation = degrees rotationLine.rotation = degrees
} }
onReleased: { onReleased: {
rotationLine.rotation = 0 rotationLine.rotation = 0
rotationGroup.rotation = startRotation + getRotationDegrees( ) rotationGroup.rotation = startRotation + getRotationDegrees( )
parent.anchors.centerIn = rotationGroup parent.anchors.centerIn = rotationGroup
rotationReleased()
} }
} }
} }
Rectangle { Rectangle {
id: rotationLine id: rotationLine
height: -rotationHandle.anchors.verticalCenterOffset - rotationHandl e.height + positionHandle.height / 2 height: -rotationHandle.anchors.verticalCenterOffset - rotationHandl e.height + positionHandle.height / 2
anchors.horizontalCenter: positionHandle.horizontalCenter anchors.horizontalCenter: positionHandle.horizontalCenter
anchors.bottom: positionHandle.verticalCenter anchors.bottom: positionHandle.verticalCenter
transformOrigin: Item.Bottom transformOrigin: Item.Bottom
width: 2 width: 2
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)