diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ set(KF5_VERSION "5.60.0") # handled by release scripts set(KF5_DEP_VERSION "5.59.0") # handled by release scripts -find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS CoreAddons I18n Config) +find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS CoreAddons I18n Config Kirigami) # Debian is a special snow flake and uses nodejs as binary name # https://lists.debian.org/debian-devel-announce/2012/07/msg00002.html diff --git a/src/plugins/bluetooth/bluetoothplugin_config.qml b/src/plugins/bluetooth/bluetoothplugin_config.qml --- a/src/plugins/bluetooth/bluetoothplugin_config.qml +++ b/src/plugins/bluetooth/bluetoothplugin_config.qml @@ -15,37 +15,57 @@ License along with this library. If not, see . */ -import QtQuick 2.1 +import QtQuick 2.7 import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.1 +import QtQuick.Controls 2.5 +import org.kde.kirigami 2.5 as Kirigami import org.kde.bluezqt 1.0 as BluezQt -ListView { +ColumnLayout { + id: root property string device: "" - Layout.fillWidth: true - Layout.fillHeight: true - header: Label { + anchors.fill: parent + anchors.bottomMargin: Kirigami.Units.smallSpacing + + Kirigami.Heading { text: i18n("Choose a device to send to:") visible: root.count !== 0 + level: 1 } - model: BluezQt.DevicesModel { } - - delegate: ItemDelegate { - width: parent.width - text: Name - onClicked: root.device = Ubi - checked: root.device === Ubi - highlighted: root.device === Ubi - } - Label { - anchors.fill: parent - verticalAlignment: Qt.AlignVCenter - horizontalAlignment: Qt.AlignHCenter - visible: root.count === 0 - text: i18n("No devices found") + ScrollView { + id: scroll + + Layout.fillWidth: true + Layout.fillHeight: true + + Component.onCompleted: scroll.background.visible = true + + ListView { + Layout.fillWidth: true + Layout.fillHeight: true + + model: BluezQt.DevicesModel { } + + delegate: Kirigami.BasicListItem { + width: parent.width + text: Name + icon: Icon + onClicked: root.device = Ubi + checked: root.device === Ubi + highlighted: root.device === Ubi + } + + Label { + anchors.fill: parent + verticalAlignment: Qt.AlignVCenter + horizontalAlignment: Qt.AlignHCenter + visible: root.count === 0 + text: i18n("No devices found") + } + } } } diff --git a/src/plugins/kdeconnect/kdeconnectplugin_config.qml b/src/plugins/kdeconnect/kdeconnectplugin_config.qml --- a/src/plugins/kdeconnect/kdeconnectplugin_config.qml +++ b/src/plugins/kdeconnect/kdeconnectplugin_config.qml @@ -15,37 +15,59 @@ License along with this library. If not, see . */ -import QtQuick 2.1 +import QtQuick 2.7 import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.1 +import QtQuick.Controls 2.5 +import org.kde.kirigami 2.5 as Kirigami import org.kde.kdeconnect 1.0 -ListView { +ColumnLayout { + id: root property string device: "" - Layout.fillWidth: true - Layout.fillHeight: true - header: Label { - text: i18nd("purpose_kdeconnect","Choose a device to send to:") - } - model: DevicesModel { - id: connectDeviceModel - displayFilter: DevicesModel.Paired | DevicesModel.Reachable - } - delegate: ItemDelegate { - width: parent.width - text: model.display - onClicked: root.device = deviceId - checked: root.device === deviceId - highlighted: root.device === deviceId + anchors.fill: parent + anchors.bottomMargin: Kirigami.Units.smallSpacing + + Kirigami.Heading { + text: i18nd("purpose_kdeconnect", "Choose a device to send to:") + visible: root.count !== 0 + level: 1 } - Label { - anchors.fill: parent - verticalAlignment: Qt.AlignVCenter - horizontalAlignment: Qt.AlignHCenter - visible: root.count === 0 - text: i18nd("purpose_kdeconnect","No devices found") + ScrollView { + id: scroll + + Layout.fillWidth: true + Layout.fillHeight: true + + Component.onCompleted: scroll.background.visible = true + + ListView { + Layout.fillWidth: true + Layout.fillHeight: true + + model: DevicesModel { + id: connectDeviceModel + displayFilter: DevicesModel.Paired | DevicesModel.Reachable + } + + delegate: Kirigami.BasicListItem { + width: parent.width + text: model.display + icon: model.iconName + onClicked: root.device = deviceId + checked: root.device === deviceId + highlighted: root.device === deviceId + } + + Label { + anchors.fill: parent + verticalAlignment: Qt.AlignVCenter + horizontalAlignment: Qt.AlignHCenter + visible: root.count === 0 + text: i18nd("purpose_kdeconnect","No devices found") + } + } } } diff --git a/src/widgets/JobDialog.qml b/src/widgets/JobDialog.qml --- a/src/widgets/JobDialog.qml +++ b/src/widgets/JobDialog.qml @@ -25,6 +25,7 @@ id: window flags: Qt.Dialog + title: configuration.pluginName width: Math.max(screen.width/3, 200) height: Math.max(screen.height/2, 300) @@ -71,17 +72,6 @@ Component { id: configWizardComponent Page { - header: Label { - TextMetrics { - id: fontMetrics - } - font.weight: Font.Light - font.styleName: "Light" - font.pointSize: fontMetrics.font.pointSize * 2 - elide: Text.ElideRight - maximumLineCount: 1 - text: i18n("%1 - %2", window.configuration.pluginName, window.configuration.pluginTypeName) - } PurposeWizard { id: wiz configuration: window.configuration