From 433bdc462fcd8fd8fd6737b37b4a2f8c4fcde0ac Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sat, 20 May 2017 12:33:58 +0200 Subject: Dont refrence outside root in statusbar --- framework/qml/StatusBar.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framework') diff --git a/framework/qml/StatusBar.qml b/framework/qml/StatusBar.qml index ea2b4db5..35ef46a8 100644 --- a/framework/qml/StatusBar.qml +++ b/framework/qml/StatusBar.qml @@ -25,6 +25,7 @@ Item { property string currentFolderName: "" property string currentFolderId: "" property string errorText: "Error" + visible: false onCurrentFolderIdChanged: root.currentFolderName = "" Kube.FolderListModel { @@ -45,23 +46,22 @@ Item { Kube.Label { id: statusText anchors.horizontalCenter: parent.horizontalCenter - visible: false color: Kube.Colors.highlightedTextColor states: [ State { name: "disconnected"; when: model.status == Kube.AccountsModel.OfflineStatus - PropertyChanges { target: statusBar; visible: true } + PropertyChanges { target: root; visible: true } PropertyChanges { target: statusText; text: "Disconnected"; visible: true } }, State { name: "busy"; when: model.status == Kube.AccountsModel.BusyStatus - PropertyChanges { target: statusBar; visible: true } + PropertyChanges { target: root; visible: true } PropertyChanges { target: statusText; text: root.currentFolderName.length > 0 ? "Synchronizing " + root.currentFolderName: "Synchronizing..."; visible: true } PropertyChanges { target: progressBar; visible: true } }, State { name: "error"; when: model.status == Kube.AccountsModel.ErrorStatus - PropertyChanges { target: statusBar; visible: true } + PropertyChanges { target: root; visible: true } PropertyChanges { target: statusText; text: root.errorText; visible: true } } ] -- cgit v1.2.3