Running scripts can now show script URL

This commit is contained in:
Brad Davis 2016-01-28 12:21:44 -08:00
parent 04e6a5360a
commit c41500f9d2

View file

@ -123,26 +123,42 @@ Window {
} }
ListView { ListView {
id: listView
clip: true clip: true
anchors { fill: parent; margins: 0 } anchors { fill: parent; margins: 0 }
model: runningScriptsModel model: runningScriptsModel
delegate: Rectangle { delegate: Rectangle {
id: rectangle
clip: true
radius: 3 radius: 3
anchors { left: parent.left; right: parent.right } anchors { left: parent.left; right: parent.right }
height: scriptName.height + 12 height: scriptName.height + 12 + (ListView.isCurrentItem ? scriptName.height + 6 : 0)
color: index % 2 ? "#ddd" : "#eee" color: ListView.isCurrentItem ? "#39f" :
index % 2 ? "#ddd" : "#eee"
Text { Text {
anchors { left: parent.left; leftMargin: 4; verticalCenter: parent.verticalCenter }
id: scriptName id: scriptName
anchors { left: parent.left; leftMargin: 4; top: parent.top; topMargin:6 }
text: name text: name
} }
Text {
id: scriptUrl
anchors { left: scriptName.left; right: parent.right; rightMargin: 4; top: scriptName.bottom; topMargin: 6 }
text: url
elide: Text.ElideMiddle
}
MouseArea {
anchors.fill: parent
onClicked: listView.currentIndex = index
}
Row { Row {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: scriptName.verticalCenter
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 4 anchors.rightMargin: 4
spacing: 4 spacing: 4