Commit 3f751ffe authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix safe zone not centered, add center cross

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