Mark the current section

This commit is contained in:
Aleix Pol 2016-08-21 18:45:49 +02:00
parent bbf33f69a6
commit d84a1a108b
2 changed files with 6 additions and 2 deletions

View file

@ -26,6 +26,7 @@ import org.kde.kdeconnect 1.0
Kirigami.Page
{
objectName: "FindDevices"
title: i18n("Pair")
ScrollView {
anchors.fill: parent

View file

@ -35,6 +35,9 @@ Kirigami.ApplicationWindow
id: findDevicesAction
text: i18n ("Find devices...")
iconName: "list-add"
checkable: pageStack.currentItem && pageStack.currentItem.objectName == "FindDevices"
checked: true
onTriggered: {
root.pageStack.clear()
root.pageStack.push("qrc:/qml/FindDevicesPage.qml");
@ -56,8 +59,8 @@ Kirigami.ApplicationWindow
iconName: model.iconName
text: display + "\n" + toolTip
enabled: status & DevicesModel.Reachable
checked: root.pageStack.currentDevice == device
checkable: true
checkable: pageStack.currentItem && pageStack.currentItem.currentDevice == device
checked: true
onTriggered: {
root.pageStack.clear()
root.pageStack.push(