From ddf3eec85e18cec7b33d7189d9ba96c527201e27 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 9 May 2017 18:07:44 +0200 Subject: Got rid of the status icons in folderlist and account switcher --- components/kube/contents/ui/MailView.qml | 4 ++++ framework/qml/FolderListView.qml | 35 +++--------------------------- framework/qml/InlineAccountSwitcher.qml | 37 ++++---------------------------- 3 files changed, 11 insertions(+), 65 deletions(-) diff --git a/components/kube/contents/ui/MailView.qml b/components/kube/contents/ui/MailView.qml index c9fa47c0..997cbb7a 100644 --- a/components/kube/contents/ui/MailView.qml +++ b/components/kube/contents/ui/MailView.qml @@ -96,6 +96,10 @@ SplitView { name: "busy"; when: model.status == Kube.AccountsModel.BusyStatus PropertyChanges { target: statusText; text: "Busy"; visible: true } PropertyChanges { target: progressBar; visible: true } + }, + State { + name: "error"; when: model.status == Kube.AccountsModel.ErrorStatus + PropertyChanges { target: statusText; text: "Error"; visible: true } } ] } diff --git a/framework/qml/FolderListView.qml b/framework/qml/FolderListView.qml index bda3683c..3b963022 100644 --- a/framework/qml/FolderListView.qml +++ b/framework/qml/FolderListView.qml @@ -130,42 +130,13 @@ TreeView { } } - Row { + Kube.Label { anchors { verticalCenter: parent.verticalCenter left: parent.left } - Kube.Label { - anchors { - verticalCenter: parent.verticalCenter - leftMargin: Kube.Units.smallSpacing - } - - text: styleData.value - - color: Kube.Colors.viewBackgroundColor - } - Kube.Icon { - id: statusIcon - visible: false - iconName: "" - states: [ - State { - name: "busy"; when: model.status == Kube.FolderListModel.InProgressStatus - PropertyChanges { target: statusIcon; iconName: Kube.Icons.busy_inverted ; visible: styleData.selected } - }, - State { - name: "error"; when: model.status == Kube.FolderListModel.ErrorStatus - //The error status should only be visible for a moment, otherwise we'll eventually always show errors everywhere. - PropertyChanges { target: statusIcon; iconName: Kube.Icons.error_inverted; visible: styleData.selected } - }, - State { - name: "checkmark"; when: model.status == Kube.FolderListModel.SuccessStatus - //The success status should only be visible for a moment, otherwise we'll eventually always show checkmarks everywhere. - PropertyChanges { target: statusIcon; iconName: Kube.Icons.success_inverted; visible: styleData.selected} - } - ] - } + text: styleData.value + color: Kube.Colors.viewBackgroundColor } } diff --git a/framework/qml/InlineAccountSwitcher.qml b/framework/qml/InlineAccountSwitcher.qml index 65b13ece..c62cab7d 100644 --- a/framework/qml/InlineAccountSwitcher.qml +++ b/framework/qml/InlineAccountSwitcher.qml @@ -70,40 +70,11 @@ FocusScope { } } - Row { - spacing: Kube.Units.smallSpacing + Kube.Label{ anchors.verticalCenter: parent.verticalCenter - Layout.fillHeight: true - - Kube.Label{ - text: model.name - font.weight: Font.Bold - color: Kube.Colors.highlightedTextColor - } - - Kube.Icon { - id: statusIcon - visible: false - iconName: "" - states: [ - State { - name: "busy"; when: model.status == Kube.AccountsModel.BusyStatus - PropertyChanges { target: statusIcon; iconName: Kube.Icons.busy_inverted; visible: true } - }, - State { - name: "error"; when: model.status == Kube.AccountsModel.ErrorStatus - PropertyChanges { target: statusIcon; iconName: Kube.Icons.error_inverted; visible: true } - }, - State { - name: "checkmark"; when: model.status == Kube.AccountsModel.ConnectedStatus - PropertyChanges { target: statusIcon; iconName: Kube.Icons.connected_inverted; visible: true } - }, - State { - name: "disconnected"; when: model.status == Kube.AccountsModel.OfflineStatus - PropertyChanges { target: statusIcon; iconName: Kube.Icons.noNetworkConnection_inverted; visible: true } - } - ] - } + text: model.name + font.weight: Font.Bold + color: Kube.Colors.highlightedTextColor } } -- cgit v1.2.3