Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Better qml font size calculation

parent 12dd330c
......@@ -107,7 +107,7 @@ Rectangle {
}
ToolTip {
visible: mouseArea.containsMouse && !dragProxyArea.pressed
font.pixelSize: root.baseUnit
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......@@ -327,7 +327,7 @@ Rectangle {
Text {
id: label
text: clipName + (clipRoot.speed != 1.0 ? ' [' + Math.round(clipRoot.speed*100) + '%]': '')
font.pixelSize: root.baseUnit * 1.2
font.pointSize: root.fontUnit
anchors {
top: labelRect.top
left: labelRect.left
......@@ -358,7 +358,7 @@ Rectangle {
}
ToolTip {
visible: offsetArea.containsMouse
font.pixelSize: root.baseUnit
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......@@ -373,7 +373,7 @@ Rectangle {
Text {
id: offsetLabel
text: positionOffset
font.pixelSize: root.baseUnit * 1.2
font.pointSize: root.fontUnit
anchors {
horizontalCenter: parent.horizontalCenter
topMargin: 1
......@@ -397,7 +397,7 @@ Rectangle {
Text {
id: effectLabel
text: clipRoot.effectNames
font.pixelSize: root.baseUnit * 1.2
font.pointSize: root.fontUnit
anchors {
top: effectsRect.top
left: effectsRect.left
......@@ -448,7 +448,7 @@ Rectangle {
id: mlabel
visible: timeline.showMarkers && parent.width > width * 1.5
text: model.comment
font.pixelSize: root.baseUnit
font.pointSize: root.fontUnit
x: markerBase.x
anchors {
bottom: parent.verticalCenter
......@@ -536,7 +536,7 @@ Rectangle {
}
ToolTip {
visible: compInArea.containsMouse && !dragProxyArea.pressed
font.pixelSize: root.baseUnit
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......@@ -586,7 +586,7 @@ Rectangle {
}
ToolTip {
visible: compOutArea.containsMouse && !dragProxyArea.pressed
font.pixelSize: root.baseUnit
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......@@ -809,7 +809,7 @@ Rectangle {
ToolTip {
visible: trimInMouseArea.containsMouse && !trimInMouseArea.pressed
font.pixelSize: root.baseUnit
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......@@ -891,7 +891,7 @@ Rectangle {
ToolTip {
visible: trimOutMouseArea.containsMouse && !trimOutMouseArea.pressed
font.pixelSize: root.baseUnit
font.pointSize: root.fontUnit
delay: 1000
timeout: 5000
background: Rectangle {
......
......@@ -219,7 +219,7 @@ Item {
Text {
id: label
text: clipName + (compositionRoot.aTrack > -1 ? ' > ' + timeline.getTrackNameFromMltIndex(compositionRoot.aTrack) : '')
font.pixelSize: root.baseUnit
font.pointSize: root.fontUnit
anchors {
top: labelRect.top
left: labelRect.left
......
......@@ -28,7 +28,7 @@ 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.9
property real fontUnit: root.baseUnit * 0.8
property alias rulerZone : zone
property int workingPreview : timeline.workingPreview
property int labelMod: 1
......
......@@ -103,7 +103,7 @@ Rectangle {
}
ColumnLayout {
id: targetColumn
width: root.baseUnit / 1.3
width: trackTagLabel.width * .3
height: trackHeadRoot.height
Item {
width: parent.width
......@@ -211,7 +211,7 @@ Rectangle {
tooltip: trackLabel.visible? i18n("Minimize") : i18n("Expand")
}
Item {
width: trackTag.contentWidth + 4
width: trackTagLabel.contentWidth + 4
height: width
Layout.topMargin: 1
Rectangle {
......@@ -222,10 +222,10 @@ Rectangle {
border.width: 0
radius: 2
Text {
id: trackTag
id: trackTagLabel
text: trackHeadRoot.trackTag
anchors.fill: parent
font.pixelSize: root.baseUnit * 1.5
font.pointSize: rulerRoot.fontUnit
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
......@@ -304,7 +304,7 @@ Rectangle {
font.pixelSize: root.baseUnit
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
visible: trackHeadRoot.collapsed && trackHeadRoot.width > trackTarget.width + expandButton.width + trackTag.width + (5 * muteButton.width)
visible: trackHeadRoot.collapsed && trackHeadRoot.width > trackTarget.width + expandButton.width + trackTagLabel.width + (5 * muteButton.width)
}
Item {
// Spacer
......
......@@ -56,7 +56,7 @@ Rectangle {
playhead.fillColor = activePalette.windowText
ruler.repaintRuler()
}
function moveSelectedTrack(offset) {
var cTrack = Logic.getTrackIndexFromId(timeline.activeTrack)
var newTrack = cTrack + offset
......@@ -220,6 +220,7 @@ Rectangle {
property int headerWidth: timeline.headerWidth()
property int activeTool: 0
property real baseUnit: fontMetrics.font.pointSize
property real fontUnit: baseUnit * 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
......
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