From 9b0c38b4c276c140783fdc5e721e998335434505 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 12 May 2017 19:18:56 +0200 Subject: Cleanup --- components/accounts/contents/ui/AccountWizard.qml | 2 - components/kube/contents/ui/LogView.qml | 138 +++++----------------- components/kube/contents/ui/MailView.qml | 5 +- 3 files changed, 35 insertions(+), 110 deletions(-) (limited to 'components') diff --git a/components/accounts/contents/ui/AccountWizard.qml b/components/accounts/contents/ui/AccountWizard.qml index fe61d81a..eff9fbb7 100644 --- a/components/accounts/contents/ui/AccountWizard.qml +++ b/components/accounts/contents/ui/AccountWizard.qml @@ -43,8 +43,6 @@ Kube.Popup { id: mainView Item { - anchors.fill: parent - Kirigami.Heading { id: heading text: "Select your new account type" diff --git a/components/kube/contents/ui/LogView.qml b/components/kube/contents/ui/LogView.qml index a9b70c59..e25ea39f 100644 --- a/components/kube/contents/ui/LogView.qml +++ b/components/kube/contents/ui/LogView.qml @@ -36,92 +36,10 @@ Controls.SplitView { } } - Item { - id: statusBar - anchors { - topMargin: Kube.Units.smallSpacing - top: parent.top - left: parent.left - right: parent.right - } - - height: Kube.Units.gridUnit * 2 - - Repeater { - model: Kube.AccountsModel { - id: accountsModel - } - - Column { - anchors.fill: statusBar - spacing: Kube.Units.smallSpacing - Row { - Kube.Label { - color: Kube.Colors.textColor - text: "Account: " + model.name - } - Kube.Label { - id: statusText - color: Kube.Colors.textColor - visible: false - states: [ - State { - name: "disconnected"; when: accountsModel.status == Kube.AccountsModel.OfflineStatus - PropertyChanges { target: statusText; text: "Offline"; visible: true } - }, - State { - name: "busy"; when: accountsModel.status == Kube.AccountsModel.BusyStatus - PropertyChanges { target: statusText; text: "Busy"; visible: true } - PropertyChanges { target: progressBar; visible: true } - } - ] - } - } - Controls2.ProgressBar { - id: progressBar - indeterminate: true - visible: false - height: Kube.Units.smallSpacing - width: parent.width - - background: Rectangle { - color: Kube.Colors.backgroundColor - radius: 3 - } - - contentItem: Item { - Rectangle { - width: progressBar.visualPosition * parent.width - height: parent.height - radius: 2 - color: Kube.Colors.highlightColor - } - } - - - Kube.Listener { - filter: Kube.Messages.progressNotification - onMessageReceived: { - progressBar.indeterminate = false - progressBar.from = 0 - progressBar.to = message.total - progressBar.value = message.progress - } - } - } - } - } - } - ListView { id: listView - anchors { - top: statusBar.bottom - left: parent.left - right: parent.right - bottom: parent.bottom - topMargin: Kube.Units.largeSpacing + margins: Kube.Units.largeSpacing } clip: true @@ -202,30 +120,38 @@ Controls.SplitView { property date timestamp property string message property variant resourceId - GridLayout { - anchors.fill: parent - columns: 2 - Kube.Label { - text: "Resource:" - } - Kube.Label { - text: details.resourceId - } - Kube.Label { - text: "Timestamp:" - } - Kube.Label { - text: Qt.formatDateTime(details.timestamp, " hh:mm:ss dd MMM yyyy") - } - Kube.Label { - text: "Message:" - } - Kube.Label { - text: details.message + color: Kube.Colors.backgroundColor + Rectangle { + anchors { + fill: parent + margins: Kube.Units.largeSpacing } - Item { - Layout.columnSpan: 2 - Layout.fillHeight: true + color: Kube.Colors.viewBackgroundColor + GridLayout { + anchors.fill: parent + columns: 2 + Kube.Label { + text: "Resource:" + } + Kube.Label { + text: details.resourceId + } + Kube.Label { + text: "Timestamp:" + } + Kube.Label { + text: Qt.formatDateTime(details.timestamp, " hh:mm:ss dd MMM yyyy") + } + Kube.Label { + text: "Message:" + } + Kube.Label { + text: details.message + } + Item { + Layout.columnSpan: 2 + Layout.fillHeight: true + } } } } diff --git a/components/kube/contents/ui/MailView.qml b/components/kube/contents/ui/MailView.qml index 6e4cbbe1..8ae2ffe4 100644 --- a/components/kube/contents/ui/MailView.qml +++ b/components/kube/contents/ui/MailView.qml @@ -112,17 +112,18 @@ SplitView { State { name: "disconnected"; when: model.status == Kube.AccountsModel.OfflineStatus PropertyChanges { target: statusBar; visible: true } - PropertyChanges { target: statusText; text: "Offline"; 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: statusText; text: "Busy"; visible: true } + PropertyChanges { target: statusText; text: "Synchronizing..."; visible: true } PropertyChanges { target: progressBar; visible: true } }, State { name: "error"; when: model.status == Kube.AccountsModel.ErrorStatus PropertyChanges { target: statusBar; visible: true } + //TODO get to an error description PropertyChanges { target: statusText; text: "Error"; visible: true } } ] -- cgit v1.2.3