More qml sizing fixes

parent 81004dca
......@@ -107,7 +107,6 @@ Rectangle {
}
ToolTip {
visible: mouseArea.containsMouse && !dragProxyArea.pressed
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......@@ -116,6 +115,7 @@ Rectangle {
}
contentItem: Label {
color: activePalette.text
font.pointSize: root.fontUnit
text: label.text + ' (' + timeline.simplifiedTC(clipRoot.inPoint) + '-' + timeline.simplifiedTC(clipRoot.outPoint) + ')'
}
}
......@@ -358,7 +358,6 @@ Rectangle {
}
ToolTip {
visible: offsetArea.containsMouse
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......@@ -367,6 +366,7 @@ Rectangle {
}
contentItem: Label {
color: activePalette.text
font.pointSize: root.fontUnit
text: positionOffset < 0 ? i18n("Offset: -%1", timeline.simplifiedTC(-positionOffset)) : i18n("Offset: %1", timeline.simplifiedTC(positionOffset))
}
}
......@@ -536,7 +536,6 @@ Rectangle {
}
ToolTip {
visible: compInArea.containsMouse && !dragProxyArea.pressed
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......@@ -545,6 +544,7 @@ Rectangle {
}
contentItem: Label {
color: activePalette.text
font.pointSize: root.fontUnit
text: i18n("Click to add composition")
}
}
......@@ -586,7 +586,6 @@ Rectangle {
}
ToolTip {
visible: compOutArea.containsMouse && !dragProxyArea.pressed
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......@@ -595,6 +594,7 @@ Rectangle {
}
contentItem: Label {
color: activePalette.text
font.pointSize: root.fontUnit
text: i18n("Click to add composition")
}
}
......@@ -809,7 +809,6 @@ Rectangle {
ToolTip {
visible: trimInMouseArea.containsMouse && !trimInMouseArea.pressed
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......@@ -818,6 +817,7 @@ Rectangle {
}
contentItem: Label {
color: activePalette.text
font.pointSize: root.fontUnit
text: i18n("In:%1\nPosition:%2", timeline.simplifiedTC(clipRoot.inPoint),timeline.simplifiedTC(clipRoot.modelStart))
}
}
......@@ -891,7 +891,6 @@ Rectangle {
ToolTip {
visible: trimOutMouseArea.containsMouse && !trimOutMouseArea.pressed
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......@@ -900,10 +899,11 @@ Rectangle {
}
contentItem: Label {
color: activePalette.text
font.pointSize: root.fontUnit
text: i18n("Out: ") + timeline.simplifiedTC(clipRoot.outPoint)
}
}
MouseArea {
id: trimOutMouseArea
anchors.fill: parent
......
......@@ -28,7 +28,6 @@ Rectangle {
property real labelSpacing: labelSize
// The space we want between each ticks in the ruler
property real tickSpacing: timeline.scaleFactor
property real fontUnit: root.baseUnit * 0.8
property alias rulerZone : zone
property int workingPreview : timeline.workingPreview
property int labelMod: 1
......@@ -43,11 +42,11 @@ Rectangle {
// labelSpacing cannot be smaller than 1 frame
rulerRoot.labelSpacing = timeline.scaleFactor > rulerRoot.labelSize * 1.3 ? timeline.scaleFactor : Math.floor(rulerRoot.labelSize/timeline.scaleFactor) * timeline.scaleFactor
} else {
rulerRoot.tickSpacing = Math.floor(3 * rulerRoot.fontUnit / timeline.scaleFactor) * timeline.scaleFactor
rulerRoot.tickSpacing = Math.floor(3 * root.fontUnit / timeline.scaleFactor) * timeline.scaleFactor
rulerRoot.labelSpacing = (Math.floor(rulerRoot.labelSize/rulerRoot.tickSpacing) + 1) * rulerRoot.tickSpacing
}
rulerRoot.labelMod = Math.max(1, Math.ceil((rulerRoot.labelSize + rulerRoot.fontUnit) / rulerRoot.tickSpacing))
//console.log('LABELMOD: ', Math.ceil((rulerRoot.labelSize + rulerRoot.fontUnit) / rulerRoot.tickSpacing)))
rulerRoot.labelMod = Math.max(1, Math.ceil((rulerRoot.labelSize + root.fontUnit) / rulerRoot.tickSpacing))
//console.log('LABELMOD: ', Math.ceil((rulerRoot.labelSize + root.fontUnit) / rulerRoot.tickSpacing)))
}
function adjustFormat() {
......@@ -120,7 +119,7 @@ Rectangle {
anchors.top: parent.top
anchors.topMargin: 2
text: timeline.timecode(parent.realPos)
font.pointSize: rulerRoot.fontUnit
font.pointSize: root.fontUnit
color: activePalette.windowText
}
}
......@@ -191,7 +190,7 @@ Rectangle {
id: inLabel
anchors.fill: parent
text: timeline.timecode(timeline.zoneIn)
font.pointSize: rulerRoot.fontUnit
font.pointSize: root.fontUnit
color: activePalette.highlightedText
}
}
......@@ -206,7 +205,7 @@ Rectangle {
id: outLabel
anchors.fill: parent
text: timeline.timecode(timeline.zoneOut)
font.pointSize: rulerRoot.fontUnit
font.pointSize: root.fontUnit
color: activePalette.highlightedText
}
}
......@@ -223,7 +222,7 @@ Rectangle {
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
text: timeline.timecode(timeline.zoneOut - timeline.zoneIn)
font.pointSize: rulerRoot.fontUnit
font.pointSize: root.fontUnit
color: activePalette.highlightedText
}
}
......
......@@ -219,8 +219,8 @@ Rectangle {
property int headerWidth: timeline.headerWidth()
property int activeTool: 0
property real baseUnit: fontMetrics.font.pointSize
property real fontUnit: baseUnit * 0.8
property real baseUnit: fontMetrics.font.pixelSize
property real fontUnit: fontMetrics.font.pointSize * 0.8
property color selectedTrackColor: Qt.rgba(activePalette.highlight.r, activePalette.highlight.g, activePalette.highlight.b, 0.2)
property color frameColor: Qt.rgba(activePalette.shadow.r, activePalette.shadow.g, activePalette.shadow.b, 0.3)
property bool autoScrolling: timeline.autoScroll
......@@ -1054,7 +1054,7 @@ Rectangle {
// Non-slider scroll area for the Ruler.
id: rulercontainer
width: root.width - headerWidth
height: fontMetrics.font.pixelSize * 2
height: root.baseUnit * 2
contentX: scrollView.flickableItem.contentX
contentWidth: Math.max(parent.width, timeline.fullDuration * timeScale)
interactive: false
......@@ -1075,8 +1075,8 @@ Rectangle {
TimelinePlayhead {
id: playhead
visible: timeline.position > -1
height: baseUnit
width: baseUnit * 1.5
height: baseUnit * .8
width: baseUnit * 1.2
fillColor: activePalette.windowText
anchors.bottom: parent.bottom
x: timeline.position * timeline.scaleFactor - (width / 2)
......@@ -1373,7 +1373,7 @@ Rectangle {
id: bubbleHelpLabel
color: activePalette.text //application.toolTipTextColor
anchors.centerIn: parent
font.pixelSize: root.baseUnit
font.pointSize: root.fontUnit
}
function show(x, y, text) {
bubbleHelp.x = x + tracksArea.x - scrollView.flickableItem.contentX - bubbleHelpLabel.width
......@@ -1488,7 +1488,7 @@ Rectangle {
id: mlabel
visible: timeline.showMarkers
text: model.comment
font.pixelSize: root.baseUnit
font.pointSize: root.fontUnit
x: guideBase.x + 2
y: scrollView.flickableItem.contentY
color: 'white'
......
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