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 Kirigami.Page
{ {
objectName: "FindDevices"
title: i18n("Pair") title: i18n("Pair")
ScrollView { ScrollView {
anchors.fill: parent anchors.fill: parent

View file

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