Commit 8f54fb2a authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Get rid of translucent timeline cursor on high zoom levels, minor optimizations

parent 8ff45d90
Pipeline #70644 skipped
......@@ -39,6 +39,7 @@ Item {
property var effectZones: timeline.masterEffectZones
property int guideLabelHeight: timeline.showMarkers ? fontMetrics.height + 2 : 0
property int previewHeight: Math.ceil(timecodeContainer.height / 5)
property color dimmedColor: (activePalette.text.r + activePalette.text.g + activePalette.text.b > 1.5) ? Qt.darker(activePalette.text, 1.3) : Qt.lighter(activePalette.text, 1.3)
function adjustStepSize() {
if (timeline.scaleFactor > 19) {
......@@ -209,16 +210,14 @@ Item {
anchors.bottom: parent.bottom
height: parent.showText ? 8 : 4
width: 1
color: activePalette.windowText
opacity: 0.5
color: dimmedColor
}
Label {
visible: parent.showText
anchors.top: parent.top
opacity: 0.7
text: timeline.timecode(parent.realPos)
font: miniFont
color: activePalette.windowText
color: dimmedColor
}
}
}
......@@ -275,6 +274,7 @@ Item {
color: "orchid"
anchors.bottom: parent.bottom
height: zoneHeight - 1
opacity: 0.7
function updateZone(start, end, update)
{
timeline.updateEffectZone(start, end, update)
......
......@@ -88,6 +88,7 @@ Rectangle {
root.color = activePalette.window
root.textColor = activePalette.text
playhead.fillColor = activePalette.windowText
ruler.dimmedColor = (activePalette.text.r + activePalette.text.g + activePalette.text.b > 1.5) ? Qt.darker(activePalette.text, 1.3) : Qt.lighter(activePalette.text, 1.3)
ruler.repaintRuler()
// Disable caching for track header icons
root.paletteUnchanged = false
......@@ -1407,11 +1408,29 @@ Rectangle {
height: parent.height
TimelinePlayhead {
id: playhead
height: root.baseUnit * .8
width: root.baseUnit * 1.2
height: Math.round(root.baseUnit * .8)
width: Math.round(root.baseUnit * 1.2)
fillColor: activePalette.windowText
anchors.bottom: parent.bottom
anchors.bottomMargin: ruler.zoneHeight - 1
x: cursor.x - (width / 2)
// bottom line on zoom
Rectangle {
color: ruler.dimmedColor
width: Math.max(1, timeline.scaleFactor)
height: 1
visible: width > playhead.width
x: playhead.width / 2
y: playhead.height - 1
}
}
Rectangle {
// Vertical line over ruler zone
color: root.textColor
width: 1
height: ruler.zoneHeight - 1
x: cursor.x
anchors.bottom: parent.bottom
}
}
}
......@@ -1728,15 +1747,6 @@ Rectangle {
opacity: 1
height: tracksContainerArea.height
x: root.consumerPosition * timeline.scaleFactor
Rectangle {
color: root.textColor
width: Math.max(0, 1 * timeline.scaleFactor - 1)
visible: width > 1
opacity: 0.2
anchors.left:parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
}
}
}
ZoomBar {
......
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