Commit b7332f88 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[app] Port runcommand page to ScrollablePage

(cherry picked from commit 3a309cc7)
parent afb8e4e8
...@@ -24,7 +24,7 @@ import QtQuick.Layouts 1.1 ...@@ -24,7 +24,7 @@ import QtQuick.Layouts 1.1
import org.kde.kirigami 2.12 as Kirigami import org.kde.kirigami 2.12 as Kirigami
import org.kde.kdeconnect 1.0 import org.kde.kdeconnect 1.0
Kirigami.Page Kirigami.ScrollablePage
{ {
id: root id: root
title: i18nd("kdeconnect-app", "Run command") title: i18nd("kdeconnect-app", "Run command")
...@@ -41,23 +41,22 @@ Kirigami.Page ...@@ -41,23 +41,22 @@ Kirigami.Page
ListView { ListView {
id: commandsList id: commandsList
anchors.fill: parent
model: RemoteCommandsModel { model: RemoteCommandsModel {
deviceId: pluginInterface.deviceId deviceId: pluginInterface.deviceId
} }
delegate: Kirigami.BasicListItem { delegate: Kirigami.BasicListItem {
width: ListView.view.width width: ListView.view.width
label: name + "\n" + command label: name
subtitle: command
onClicked: pluginInterface.triggerCommand(key) onClicked: pluginInterface.triggerCommand(key)
reserveSpaceForIcon: false reserveSpaceForIcon: false
} }
}
Kirigami.PlaceholderMessage { Kirigami.PlaceholderMessage {
visible: commandsList.count === 0 visible: commandsList.count === 0
text: i18nd("kdeconnect-app", "No commands defined") text: i18nd("kdeconnect-app", "No commands defined")
anchors.centerIn: parent anchors.centerIn: parent
} }
}
} }
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