Add a refresh button to the plasmoid
Summary: This adds a refresh button to the plasmoid if no device is connected. Test Plan: Refreshing works, and the button only appears when no devices are connected. Reviewers: #kde_connect, nicolasfella Reviewed By: #kde_connect, nicolasfella Subscribers: apol, nicolasfella, #kde_connect Differential Revision: https://phabricator.kde.org/D11501
This commit is contained in:
parent
4096fc3e35
commit
ca4b4227ce
1 changed files with 20 additions and 5 deletions
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Layouts 1.1
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||
|
@ -28,12 +29,25 @@ Item {
|
|||
id: kdeconnect
|
||||
property alias devicesModel: devicesView.model
|
||||
|
||||
PlasmaExtras.Heading {
|
||||
width: parent.width
|
||||
level: 3
|
||||
opacity: 0.6
|
||||
text: i18n("No paired devices available")
|
||||
RowLayout {
|
||||
visible: devicesView.count==0
|
||||
width: parent.width
|
||||
|
||||
PlasmaExtras.Heading {
|
||||
Layout.fillWidth: true
|
||||
level: 3
|
||||
opacity: 0.6
|
||||
text: i18n("No paired devices available")
|
||||
}
|
||||
|
||||
PlasmaComponents.Button {
|
||||
iconSource: "view-refresh"
|
||||
tooltip: i18n("Search for devices")
|
||||
|
||||
onClicked: {
|
||||
KdeConnect.DaemonDbusInterface.forceOnNetworkChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -48,6 +62,7 @@ Item {
|
|||
PlasmaExtras.ScrollArea {
|
||||
id: dialogItem
|
||||
anchors.fill: parent
|
||||
visible: devicesView.count > 0
|
||||
|
||||
ListView {
|
||||
id: devicesView
|
||||
|
|
Loading…
Reference in a new issue