diff options
-rw-r--r-- | src/main.qml | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/main.qml b/src/main.qml index 4494526..102df11 100644 --- a/src/main.qml +++ b/src/main.qml @@ -219,16 +219,19 @@ ApplicationWindow { width: parent.width height: 56 - y y: -6 - clip: false model: mainqmladaptor.rwaHostModel textRole: "alias" onCurrentIndexChanged: { var rwa_host = mainqmladaptor.rwaHostModel - if (rwa_host[currentIndex] !== undefined) + if (rwa_host[currentIndex] !== undefined) { sidebar_drawer.rwaHostSelected(rwa_host[currentIndex].uuid) + displayText = rwa_host[currentIndex].alias + } } + + } } @@ -241,9 +244,9 @@ ApplicationWindow { onClicked: { var scene_url = "scenes/Scene_placeholder.qml" header_text.text = qsTr("Settings") - if(inPortrait) sidebar_drawer.close() + if (inPortrait) sidebar_drawer.close() - if(scene_url.search(main_content.currentItem.objectName) >= 0) return + if (scene_url.search(main_content.currentItem.objectName) >= 0) return main_content.replace(scene_url, StackView.Transition) } @@ -262,9 +265,9 @@ ApplicationWindow { scene_url: "scenes/Scene_remote_control.qml" onListItemClick: { header_text.text = qsTr("Allow remote control") - if(inPortrait) sidebar_drawer.close() + if (inPortrait) sidebar_drawer.close() - if(scene_url.search(main_content.currentItem.objectName) >= 0) return + if (scene_url.search(main_content.currentItem.objectName) >= 0) return main_content.replace(scene_url, StackView.Transition) } @@ -276,9 +279,9 @@ ApplicationWindow { scene_url: "scenes/Scene_remote_view.qml" onListItemClick: { header_text.text = qsTr("Allow remote view") - if(inPortrait) sidebar_drawer.close() + if (inPortrait) sidebar_drawer.close() - if(scene_url.search(main_content.currentItem.objectName) >= 0) return + if (scene_url.search(main_content.currentItem.objectName) >= 0) return main_content.replace(scene_url, StackView.Transition) } @@ -290,9 +293,9 @@ ApplicationWindow { scene_url: "scenes/add_server_wizard/Scene_step_1.qml" onListItemClick: { header_text.text = qsTr("Server addition wizard") - if(inPortrait) sidebar_drawer.close() + if (inPortrait) sidebar_drawer.close() - if(scene_url.search(main_content.currentItem.objectName) >= 0) return + if (scene_url.search(main_content.currentItem.objectName) >= 0) return main_content.push(scene_url, StackView.ReplaceTransition) } } |