Fix track name font size and collapsed dimensions

parent 7b474696
...@@ -37,10 +37,10 @@ Rectangle { ...@@ -37,10 +37,10 @@ Rectangle {
property bool current: false property bool current: false
property int myTrackHeight property int myTrackHeight
property int trackId : -42 property int trackId : -42
property int collapsedHeight: nameEdit.height + 2
property int iconSize: root.baseUnit * 2 property int iconSize: root.baseUnit * 2
property string trackTag property string trackTag
property int thumbsFormat: 0 property int thumbsFormat: 0
property int collapsedHeight: expandButton.height
border.width: 1 border.width: 1
border.color: root.frameColor border.color: root.frameColor
signal clicked() signal clicked()
...@@ -414,7 +414,7 @@ Rectangle { ...@@ -414,7 +414,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 4 anchors.leftMargin: 4
elide: Qt.ElideRight elide: Qt.ElideRight
font.pointSize: root.baseUnit * 0.9 font.pointSize: root.fontUnit
} }
Label { Label {
id: placeHolder id: placeHolder
...@@ -425,14 +425,14 @@ Rectangle { ...@@ -425,14 +425,14 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 4 anchors.leftMargin: 4
elide: Qt.ElideRight elide: Qt.ElideRight
font.pointSize: root.baseUnit * 0.9 font.pointSize: root.fontUnit
} }
TextField { TextField {
id: nameEdit id: nameEdit
visible: false visible: false
width: parent.width width: parent.width
text: trackName text: trackName
font.pointSize: root.baseUnit * 0.9 font.pointSize: root.fontUnit
style: TextFieldStyle { style: TextFieldStyle {
padding.top:0 padding.top:0
padding.bottom: 0 padding.bottom: 0
...@@ -497,7 +497,7 @@ Rectangle { ...@@ -497,7 +497,7 @@ Rectangle {
if (mouse.buttons === Qt.LeftButton) { if (mouse.buttons === Qt.LeftButton) {
parent.opacity = 0.5 parent.opacity = 0.5
var newHeight = originalY + (mapToItem(null, x, y).y - startY) var newHeight = originalY + (mapToItem(null, x, y).y - startY)
newHeight = Math.max(collapsedHeight, newHeight) newHeight = Math.max(trackHeadRoot.collapsedHeight, newHeight)
trackHeadRoot.myTrackHeight = newHeight trackHeadRoot.myTrackHeight = newHeight
} }
} }
......
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