Don't hide the plasmoid, otherwise the install buttons don't make sense

This commit is contained in:
Albert Vaca Cintora 2019-09-19 18:39:45 +02:00
parent 40b6a9ca15
commit 9f8928513d
2 changed files with 9 additions and 5 deletions

View file

@ -32,8 +32,7 @@ Item {
ColumnLayout { ColumnLayout {
spacing: 5 spacing: 5
visible: devicesView.count == 0 visible: devicesView.count == 0
width: parent.width anchors.fill: parent
height: parent.height
PlasmaExtras.Heading { PlasmaExtras.Heading {
id: heading id: heading
@ -49,6 +48,7 @@ Item {
PlasmaComponents.Label { PlasmaComponents.Label {
Layout.fillWidth: true Layout.fillWidth: true
Layout.bottomMargin: units.largeSpacing
text: i18n("Install KDE Connect on your Android device to integrate it with Plasma!") text: i18n("Install KDE Connect on your Android device to integrate it with Plasma!")
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@ -56,15 +56,19 @@ Item {
} }
PlasmaComponents.Button { PlasmaComponents.Button {
Layout.leftMargin: units.largeSpacing
Layout.rightMargin: units.largeSpacing
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
text: i18n("Install from Google Play") text: i18n("Install from Google Play")
onClicked: Qt.openUrlExternally("https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp") onClicked: Qt.openUrlExternally("https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp")
} }
PlasmaComponents.Button { PlasmaComponents.Button {
Layout.leftMargin: units.largeSpacing
Layout.rightMargin: units.largeSpacing
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
text: i18n("Install from F-Droid") text: i18n("Install from F-Droid")
onClicked: Qt.openUrlExternally("https://f-droid.org/en/packages/org.kde.kdeconnect_tp/") onClicked: Qt.openUrlExternally("https://f-droid.org/en/packages/org.kde.kdeconnect_tp/")
} }

View file

@ -42,7 +42,7 @@ Item
Binding { Binding {
target: plasmoid target: plasmoid
property: "status" property: "status"
value: (connectDeviceModel.count > 0) ? PlasmaCore.Types.ActiveStatus : ((pairedDeviceModel.count > 0) ? PlasmaCore.Types.HiddenStatus : PlasmaCore.Types.PassiveStatus) value: (connectDeviceModel.count > 0) ? PlasmaCore.Types.ActiveStatus : PlasmaCore.Types.PassiveStatus
} }
Plasmoid.fullRepresentation: FullRepresentation { Plasmoid.fullRepresentation: FullRepresentation {