diff --git a/src/libs/timeline/qml/Detail.qml b/src/libs/timeline/qml/Detail.qml index 83bd262ba0c..762ac62fff2 100644 --- a/src/libs/timeline/qml/Detail.qml +++ b/src/libs/timeline/qml/Detail.qml @@ -32,10 +32,12 @@ import QtQuick 2.1 Text { property bool isLabel: false + property int labelWidth: 85 + property int valueWidth: 170 font.pixelSize: 12 font.bold: isLabel textFormat: Text.PlainText renderType: Text.NativeRendering elide: Text.ElideRight - width: text === "" ? 0 : (isLabel ? 85 : 170) + width: text === "" ? 0 : (isLabel ? labelWidth : valueWidth) } diff --git a/src/libs/timeline/qml/MainView.qml b/src/libs/timeline/qml/MainView.qml index 0c475183132..78d2be0c48c 100644 --- a/src/libs/timeline/qml/MainView.qml +++ b/src/libs/timeline/qml/MainView.qml @@ -325,7 +325,7 @@ Rectangle { } SelectionRangeDetails { - z: 1 + z: 3 x: 200 y: 125 @@ -351,7 +351,7 @@ Rectangle { RangeDetails { id: rangeDetails - z: 1 + z: 3 visible: false x: 200 y: 25 diff --git a/src/libs/timeline/qml/RangeDetails.qml b/src/libs/timeline/qml/RangeDetails.qml index 55d53c6de49..a8903863666 100644 --- a/src/libs/timeline/qml/RangeDetails.qml +++ b/src/libs/timeline/qml/RangeDetails.qml @@ -54,7 +54,7 @@ Item { signal clearSelection width: col.width + 25 - height: col.height + 30 + height: contentArea.height + titleBar.height function hide() { noteEdit.focus = false; @@ -146,8 +146,8 @@ Item { y: px + 1 } - // title bar Rectangle { + id: titleBar width: parent.width height: 20 color: "#55a3b8" @@ -186,6 +186,7 @@ Item { // Details area Rectangle { + id: contentArea color: "white" width: parent.width height: 10 + col.height + (noteEdit.visible ? (noteEdit.height + 5) : 0) @@ -204,6 +205,7 @@ Item { Repeater { model: eventInfo Detail { + valueWidth: dragHandle.x - x - 15 isLabel: index % 2 === 0 text: (content === undefined) ? "" : (isLabel ? (content + ":") : content) } @@ -298,4 +300,26 @@ Item { } } + Item { + id: dragHandle + width: 10 + height: 10 + x: 300 + anchors.bottom: parent.bottom + clip: true + MouseArea { + anchors.fill: parent + drag.target: parent + drag.axis: Drag.XAxis + cursorShape: Qt.SizeHorCursor + } + Rectangle { + color: "#55a3b8" + rotation: 45 + width: parent.width * Math.SQRT2 + height: parent.height * Math.SQRT2 + x: parent.width - width / 2 + y: parent.height - height / 2 + } + } }