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

Samll improvement in timeline ui scaling on low res monitors

parent 91751751
Pipeline #53351 passed with stage
in 10 minutes and 16 seconds
...@@ -31,6 +31,7 @@ Item { ...@@ -31,6 +31,7 @@ Item {
property int workingPreview : timeline.workingPreview property int workingPreview : timeline.workingPreview
property int labelMod: 1 property int labelMod: 1
property bool useTimelineRuler : timeline.useRuler property bool useTimelineRuler : timeline.useRuler
property int zoneHeight: Math.ceil(root.baseUnit / 2)
property bool showZoneLabels: false property bool showZoneLabels: false
property bool resizeActive: false // Used to decide which mouse cursor we should display property bool resizeActive: false // Used to decide which mouse cursor we should display
...@@ -129,7 +130,7 @@ Item { ...@@ -129,7 +130,7 @@ Item {
width: rulerRoot.width width: rulerRoot.width
height: 1 height: 1
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin: root.baseUnit / 2 anchors.bottomMargin: zoneHeight
color: activePalette.shadow color: activePalette.shadow
Rectangle { Rectangle {
width: rulerRoot.width width: rulerRoot.width
...@@ -153,7 +154,7 @@ Item { ...@@ -153,7 +154,7 @@ Item {
color: useTimelineRuler ? Qt.rgba(activePalette.highlight.r,activePalette.highlight.g,activePalette.highlight.b,0.9) : color: useTimelineRuler ? Qt.rgba(activePalette.highlight.r,activePalette.highlight.g,activePalette.highlight.b,0.9) :
Qt.rgba(activePalette.highlight.r,activePalette.highlight.g,activePalette.highlight.b,0.5) Qt.rgba(activePalette.highlight.r,activePalette.highlight.g,activePalette.highlight.b,0.5)
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
height: root.baseUnit / 2 height: zoneHeight
function updateZone(start, end, update) function updateZone(start, end, update)
{ {
timeline.updateZone(start, end, update) timeline.updateZone(start, end, update)
...@@ -175,7 +176,7 @@ Item { ...@@ -175,7 +176,7 @@ Item {
color: 'yellow' color: 'yellow'
opacity: 0.9 opacity: 0.9
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
height: root.baseUnit / 2 height: zoneHeight
function updateZone(start, end, update) function updateZone(start, end, update)
{ {
timeline.updateEffectZone(start, end, update) timeline.updateEffectZone(start, end, update)
......
...@@ -343,7 +343,7 @@ Rectangle { ...@@ -343,7 +343,7 @@ Rectangle {
} }
property int activeTool: 0 property int activeTool: 0
property real baseUnit: fontMetrics.font.pixelSize property real baseUnit: Math.max(12, fontMetrics.font.pixelSize)
property real fontUnit: fontMetrics.font.pointSize property real fontUnit: fontMetrics.font.pointSize
property int collapsedHeight: Math.max(28, baseUnit * 1.8) property int collapsedHeight: Math.max(28, baseUnit * 1.8)
property int minHeaderWidth: 6 * collapsedHeight property int minHeaderWidth: 6 * collapsedHeight
......
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