53 lines
1.0 KiB
QML
53 lines
1.0 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
|
|
Column {
|
|
id: root
|
|
|
|
property var plugins: []
|
|
|
|
spacing: 12
|
|
|
|
Label {
|
|
width: parent.width
|
|
text: "Available tools"
|
|
font.pixelSize: 24
|
|
font.bold: true
|
|
}
|
|
|
|
Label {
|
|
width: parent.width
|
|
text: root.plugins.length === 1
|
|
? "1 tool"
|
|
: root.plugins.length + " tools"
|
|
color: palette.placeholderText
|
|
}
|
|
|
|
ListView {
|
|
id: pluginView
|
|
|
|
width: parent.width
|
|
height: Math.max(0, root.height - y)
|
|
clip: true
|
|
spacing: 10
|
|
model: root.plugins
|
|
boundsBehavior: Flickable.StopAtBounds
|
|
|
|
delegate: PluginCard {
|
|
required property var modelData
|
|
|
|
width: pluginView.width
|
|
plugin: modelData
|
|
}
|
|
|
|
ScrollBar.vertical: ScrollBar {}
|
|
}
|
|
|
|
Label {
|
|
anchors.centerIn: parent
|
|
visible: root.plugins.length === 0
|
|
text: "No tools are currently available."
|
|
color: palette.placeholderText
|
|
}
|
|
}
|