From 939373547855d400f227a53786e6f60faab93905 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 19 Jan 2016 20:25:16 +1300 Subject: [PATCH] Make running scripts list scrollable with scroll bar --- .../resources/qml/dialogs/RunningScripts.qml | 63 ++++++++++--------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/interface/resources/qml/dialogs/RunningScripts.qml b/interface/resources/qml/dialogs/RunningScripts.qml index d259f747ad..26ec306567 100644 --- a/interface/resources/qml/dialogs/RunningScripts.qml +++ b/interface/resources/qml/dialogs/RunningScripts.qml @@ -111,8 +111,7 @@ Window { Button { text: "Stop all"; onClicked: stopAll() } } - ListView { - clip: true + ScrollView { anchors { top: allButtons.bottom; left: parent.left; @@ -122,45 +121,49 @@ Window { bottomMargin: 8 } - model: runningScriptsModel + ListView { + clip: true + anchors { fill: parent; margins: 0 } - delegate: Rectangle { - radius: 3 - anchors { left: parent.left; right: parent.right } + model: runningScriptsModel - height: scriptName.height + 12 - color: index % 2 ? "#ddd" : "#eee" + delegate: Rectangle { + radius: 3 + anchors { left: parent.left; right: parent.right } - Text { - anchors { left: parent.left; leftMargin: 4; verticalCenter: parent.verticalCenter } - id: scriptName - text: name - } + height: scriptName.height + 12 + color: index % 2 ? "#ddd" : "#eee" - Row { - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 4 - spacing: 4 - HifiControls.FontAwesome { - text: "\uf021"; size: scriptName.height; - MouseArea { - anchors { fill: parent; margins: -2; } - onClicked: reloadScript(model.url) - } + Text { + anchors { left: parent.left; leftMargin: 4; verticalCenter: parent.verticalCenter } + id: scriptName + text: name } - HifiControls.FontAwesome { - size: scriptName.height; text: "\uf00d" - MouseArea { - anchors { fill: parent; margins: -2; } - onClicked: stopScript(model.url) + + Row { + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 4 + spacing: 4 + HifiControls.FontAwesome { + text: "\uf021"; size: scriptName.height; + MouseArea { + anchors { fill: parent; margins: -2; } + onClicked: reloadScript(model.url) + } + } + HifiControls.FontAwesome { + size: scriptName.height; text: "\uf00d" + MouseArea { + anchors { fill: parent; margins: -2; } + onClicked: stopScript(model.url) + } } } } } } - Text { id: loadLabel text: "Load Scripts"