Fix safe zone not centered, add center cross

parent d19bb34a
......@@ -60,136 +60,148 @@ Item {
}
}
SceneToolBar {
id: sceneToolBar
anchors {
left: parent.left
top: parent.top
topMargin: 10
leftMargin: 10
}
visible: root.showToolbar
}
Item {
id: frame
objectName: "referenceframe"
width: root.profile.x * root.scalex
height: root.profile.y * root.scaley
anchors.centerIn: parent
visible: root.showSafezone
id: monitorOverlay
height: root.height - root.rulerHeight
width: root.width
SceneToolBar {
id: sceneToolBar
anchors {
left: parent.left
top: parent.top
topMargin: 10
leftMargin: 10
}
visible: root.showToolbar
}
Rectangle {
id: safezone
objectName: "safezone"
color: "transparent"
border.color: "cyan"
width: parent.width * 0.9
height: parent.height * 0.9
Item {
id: frame
objectName: "referenceframe"
width: root.profile.x * root.scalex
height: root.profile.y * root.scaley
anchors.centerIn: parent
visible: root.showSafezone
Rectangle {
id: safetext
objectName: "safetext"
color: "transparent"
border.color: "cyan"
width: frame.width * 0.8
height: frame.height * 0.8
anchors.centerIn: parent
id: safezone
objectName: "safezone"
color: "transparent"
border.color: "cyan"
width: parent.width * 0.9
height: parent.height * 0.9
anchors.centerIn: parent
Rectangle {
id: safetext
objectName: "safetext"
color: "transparent"
border.color: "cyan"
width: frame.width * 0.8
height: frame.height * 0.8
anchors.centerIn: parent
}
Rectangle {
color: "cyan"
width: root.width / 5
height: 1
anchors.centerIn: parent
}
Rectangle {
color: "cyan"
height: root.width / 5
width: 1
anchors.centerIn: parent
}
}
}
}
QmlAudioThumb {
id: audioThumb
objectName: "audiothumb"
property bool stateVisible: true
anchors {
left: parent.left
bottom: parent.bottom
bottomMargin: root.rulerHeight
}
height: parent.height / 6
//font.pixelSize * 3
width: parent.width
visible: root.showAudiothumb
QmlAudioThumb {
id: audioThumb
objectName: "audiothumb"
property bool stateVisible: true
anchors {
left: parent.left
bottom: parent.bottom
}
height: parent.height / 6
//font.pixelSize * 3
width: parent.width
visible: root.showAudiothumb
states: [
State { when: audioThumb.stateVisible;
PropertyChanges { target: audioThumb; opacity: 1.0 } },
State { when: !audioThumb.stateVisible;
PropertyChanges { target: audioThumb; opacity: 0.0 } }
]
transitions: [ Transition {
NumberAnimation { property: "opacity"; duration: 500}
} ]
states: [
State { when: audioThumb.stateVisible;
PropertyChanges { target: audioThumb; opacity: 1.0 } },
State { when: !audioThumb.stateVisible;
PropertyChanges { target: audioThumb; opacity: 0.0 } }
]
transitions: [ Transition {
NumberAnimation { property: "opacity"; duration: 500}
} ]
MouseArea {
hoverEnabled: true
onExited: audioThumb.stateVisible = false
onEntered: audioThumb.stateVisible = true
acceptedButtons: Qt.NoButton
anchors.fill: parent
MouseArea {
hoverEnabled: true
onExited: audioThumb.stateVisible = false
onEntered: audioThumb.stateVisible = true
acceptedButtons: Qt.NoButton
anchors.fill: parent
}
}
}
Text {
id: timecode
objectName: "timecode"
color: "white"
style: Text.Outline;
styleColor: "black"
text: root.timecode
font.pixelSize: root.baseUnit
visible: root.showTimecode
anchors {
right: root.right
bottom: root.bottom
rightMargin: 4
bottomMargin: root.rulerHeight
}
}
Text {
id: fpsdropped
objectName: "fpsdropped"
color: root.dropped ? "red" : "white"
style: Text.Outline;
styleColor: "black"
text: root.fps + "fps"
visible: root.showFps
font.pixelSize: root.baseUnit
anchors {
right: timecode.visible ? timecode.left : root.right
bottom: root.bottom
rightMargin: 10
bottomMargin: root.rulerHeight
}
}
TextField {
id: marker
objectName: "markertext"
activeFocusOnPress: true
onEditingFinished: {
root.markerText = marker.displayText
marker.focus = false
root.editCurrentMarker()
Text {
id: timecode
objectName: "timecode"
color: "white"
style: Text.Outline;
styleColor: "black"
text: root.timecode
font.pixelSize: root.baseUnit
visible: root.showTimecode
anchors {
right: parent.right
bottom: parent.bottom
rightMargin: 4
}
}
anchors {
left: parent.left
bottom: parent.bottom
bottomMargin: root.rulerHeight
Text {
id: fpsdropped
objectName: "fpsdropped"
color: root.dropped ? "red" : "white"
style: Text.Outline;
styleColor: "black"
text: root.fps + "fps"
visible: root.showFps
font.pixelSize: root.baseUnit
anchors {
right: timecode.visible ? timecode.left : parent.right
bottom: parent.bottom
rightMargin: 10
}
}
visible: root.showMarkers && text != ""
text: root.markerText
maximumLength: 20
style: TextFieldStyle {
textColor: "white"
background: Rectangle {
color: "#99ff0000"
width: marker.width
TextField {
id: marker
objectName: "markertext"
activeFocusOnPress: true
onEditingFinished: {
root.markerText = marker.displayText
marker.focus = false
root.editCurrentMarker()
}
anchors {
left: parent.left
bottom: parent.bottom
}
visible: root.showMarkers && text != ""
text: root.markerText
maximumLength: 20
style: TextFieldStyle {
textColor: "white"
background: Rectangle {
color: "#99ff0000"
width: marker.width
}
}
font.pixelSize: root.baseUnit
}
font.pixelSize: root.baseUnit
}
MonitorRuler {
id: clipMonitorRuler
......
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.2
import Kdenlive.Controls 1.0
import QtQuick 2.4
import AudioThumb 1.0
Item {
id: root
......@@ -38,7 +41,6 @@ Item {
font.family: "Arial"
}
onZoomChanged: {
sceneToolBar.setZoom(root.zoom)
}
......@@ -58,104 +60,116 @@ Item {
}
}
SceneToolBar {
id: sceneToolBar
anchors {
left: parent.left
top: parent.top
topMargin: 10
leftMargin: 10
}
visible: root.showToolbar
}
Item {
id: frame
objectName: "referenceframe"
width: root.profile.x * root.scalex
height: root.profile.y * root.scaley
anchors.centerIn: parent
visible: root.showSafezone
Rectangle {
id: safezone
objectName: "safezone"
color: "transparent"
border.color: "cyan"
width: parent.width * 0.9
height: parent.height * 0.9
anchors.centerIn: parent
Rectangle {
id: safetext
objectName: "safetext"
color: "transparent"
border.color: "cyan"
width: frame.width * 0.8
height: frame.height * 0.8
anchors.centerIn: parent
id: monitorOverlay
height: root.height - root.rulerHeight
width: root.width
SceneToolBar {
id: sceneToolBar
anchors {
left: parent.left
top: parent.top
topMargin: 10
leftMargin: 10
}
visible: root.showToolbar
}
}
Text {
id: timecode
objectName: "timecode"
color: "white"
style: Text.Outline;
styleColor: "black"
text: root.timecode
visible: root.showTimecode
font.pixelSize: root.baseUnit
anchors {
right: root.right
bottom: root.bottom
rightMargin: 4
bottomMargin: root.rulerHeight
}
}
Item {
id: frame
objectName: "referenceframe"
width: root.profile.x * root.scalex
height: root.profile.y * root.scaley
anchors.centerIn: parent
visible: root.showSafezone
Text {
id: fpsdropped
objectName: "fpsdropped"
color: root.dropped ? "red" : "white"
style: Text.Outline;
styleColor: "black"
text: root.fps + "fps"
visible: root.showFps
font.pixelSize: root.baseUnit
anchors {
right: timecode.visible ? timecode.left : root.right
bottom: root.bottom
rightMargin: 10
bottomMargin: root.rulerHeight
Rectangle {
id: safezone
objectName: "safezone"
color: "transparent"
border.color: "cyan"
width: parent.width * 0.9
height: parent.height * 0.9
anchors.centerIn: parent
Rectangle {
id: safetext
objectName: "safetext"
color: "transparent"
border.color: "cyan"
width: frame.width * 0.8
height: frame.height * 0.8
anchors.centerIn: parent
}
Rectangle {
color: "cyan"
width: root.width / 5
height: 1
anchors.centerIn: parent
}
Rectangle {
color: "cyan"
height: root.width / 5
width: 1
anchors.centerIn: parent
}
}
}
}
TextField {
id: marker
objectName: "markertext"
activeFocusOnPress: true
onEditingFinished: {
root.markerText = marker.displayText
marker.focus = false
root.editCurrentMarker()
Text {
id: timecode
objectName: "timecode"
color: "white"
style: Text.Outline;
styleColor: "black"
text: root.timecode
font.pixelSize: root.baseUnit
visible: root.showTimecode
anchors {
right: parent.right
bottom: parent.bottom
rightMargin: 4
}
}
anchors {
left: parent.left
bottom: parent.bottom
bottomMargin: root.rulerHeight
Text {
id: fpsdropped
objectName: "fpsdropped"
color: root.dropped ? "red" : "white"
style: Text.Outline;
styleColor: "black"
text: root.fps + "fps"
visible: root.showFps
font.pixelSize: root.baseUnit
anchors {
right: timecode.visible ? timecode.left : parent.right
bottom: parent.bottom
rightMargin: 10
}
}
visible: root.showMarkers && text != ""
maximumLength: 20
text: root.markerText
style: TextFieldStyle {
textColor: "white"
background: Rectangle {
color: "#990000ff"
width: marker.width
TextField {
id: marker
objectName: "markertext"
activeFocusOnPress: true
onEditingFinished: {
root.markerText = marker.displayText
marker.focus = false
root.editCurrentMarker()
}
anchors {
left: parent.left
bottom: parent.bottom
}
visible: root.showMarkers && text != ""
text: root.markerText
maximumLength: 20
style: TextFieldStyle {
textColor: "white"
background: Rectangle {
color: "#99ff0000"
width: marker.width
}
}
font.pixelSize: root.baseUnit
}
font.pixelSize: root.baseUnit
}
MonitorRuler {
id: clipMonitorRuler
......
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