From 68ed477e34756beb5b152f8077c2e2527bba4708 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 21 Apr 2017 18:16:28 +0200 Subject: The outbox is back --- components/kube/contents/ui/Kube.qml | 26 ++++++++------- framework/qml/Icons.qml | 2 ++ framework/qml/Outbox.qml | 38 ++++++++-------------- .../places/16/mail-folder-outbox-inverted.svg | 13 ++++++++ .../breeze/icons/places/16/mail-folder-outbox.svg | 13 ++++++++ .../places/22/mail-folder-outbox-inverted.svg | 13 ++++++++ .../breeze/icons/places/22/mail-folder-outbox.svg | 13 ++++++++ icons/copybreeze.sh | 1 + 8 files changed, 83 insertions(+), 36 deletions(-) create mode 100644 icons/breeze/icons/places/16/mail-folder-outbox-inverted.svg create mode 100644 icons/breeze/icons/places/16/mail-folder-outbox.svg create mode 100644 icons/breeze/icons/places/22/mail-folder-outbox-inverted.svg create mode 100644 icons/breeze/icons/places/22/mail-folder-outbox.svg diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml index e6dd7db1..8537dba2 100644 --- a/components/kube/contents/ui/Kube.qml +++ b/components/kube/contents/ui/Kube.qml @@ -179,6 +179,19 @@ Controls2.ApplicationWindow { width: height } } + Column { + anchors { + bottom: parent.bottom + bottomMargin: Kube.Units.smallSpacing + horizontalCenter: parent.horizontalCenter + } + + spacing: Kube.Units.largeSpacing - Kube.Units.smallSpacing + Kube.Outbox { + height: Kube.Units.gridUnit * 1.5 + width: height + } + } } SplitView { @@ -222,7 +235,7 @@ Controls2.ApplicationWindow { width: parent.width - Kube.Units.largeSpacing } } -//TODO bring back status bar and outbox +//TODO bring back status bar // Item { // id: statusBar // anchors { @@ -249,17 +262,6 @@ Controls2.ApplicationWindow { // ] // } // } -// } -// -// Kube.Outbox { -// id: outbox -// -// anchors { -// bottom: toolBar.top -// left: parent.left -// right: parent.right -// } -// height: Kube.Units.gridUnit * 1.5 // } Kube.MailListView { diff --git a/framework/qml/Icons.qml b/framework/qml/Icons.qml index 8d63f021..ee706d95 100644 --- a/framework/qml/Icons.qml +++ b/framework/qml/Icons.qml @@ -39,6 +39,8 @@ Item { property string moveToTrash: "edit-delete" property string edit: "document-edit" property string replyToSender: "mail-reply-sender" + property string outbox: "mail-folder-outbox" + property string outbox_inverted: "mail-folder-outbox-inverted" property string menu_inverted: "application-menu-inverted" property string user_inverted: "im-user-inverted" diff --git a/framework/qml/Outbox.qml b/framework/qml/Outbox.qml index 43d0f102..fc960667 100644 --- a/framework/qml/Outbox.qml +++ b/framework/qml/Outbox.qml @@ -25,7 +25,7 @@ import org.kde.kirigami 1.0 as Kirigami import org.kube.framework 1.0 as Kube -Rectangle { +Controls.ToolButton { id: root visible: outboxModel.count > 0 @@ -36,42 +36,32 @@ Rectangle { Kube.OutboxModel { id: outboxModel } + iconName: Kube.Icons.outbox states: [ State { name: "busy"; when: outboxModel.status == Kube.OutboxModel.InProgressStatus - PropertyChanges { target: icon; iconName: Kube.Icons.busy_inverted } + PropertyChanges { target: root; iconName: Kube.Icons.busy_inverted } }, State { name: "error"; when: outboxModel.status == Kube.OutboxModel.ErrorStatus - PropertyChanges { target: icon; iconName: Kube.Icons.error_inverted } + PropertyChanges { target: root; iconName: Kube.Icons.error_inverted } } ] - color: Kube.Colors.textColor - clip: true - - Row { - anchors.centerIn: parent - spacing: Kube.Units.smallSpacing - Kube.Label { - id: text - anchors.verticalCenter: parent.verticalCenter - text: outboxModel.count > 0 ? "Pending (" + outboxModel.count + ")" : "Outbox" - color: Kube.Colors.highlightedTextColor - } - Icon { - id: icon - anchors.verticalCenter: parent.verticalCenter - iconName: "" - visible: iconName != "" + Kube.Label { + id: text + anchors { + right: parent.right + bottom: parent.bottom } + width: Kube.Units.smallSpacing + text: outboxModel.count + color: Kube.Colors.disabledTextColor + font.pointSize: 9 } - MouseArea { - anchors.fill: parent - onClicked: dialog.open() - } + onClicked: dialog.open() Kube.Popup { id: dialog diff --git a/icons/breeze/icons/places/16/mail-folder-outbox-inverted.svg b/icons/breeze/icons/places/16/mail-folder-outbox-inverted.svg new file mode 100644 index 00000000..bd677de8 --- /dev/null +++ b/icons/breeze/icons/places/16/mail-folder-outbox-inverted.svg @@ -0,0 +1,13 @@ + + + + + + diff --git a/icons/breeze/icons/places/16/mail-folder-outbox.svg b/icons/breeze/icons/places/16/mail-folder-outbox.svg new file mode 100644 index 00000000..b0fbba26 --- /dev/null +++ b/icons/breeze/icons/places/16/mail-folder-outbox.svg @@ -0,0 +1,13 @@ + + + + + + diff --git a/icons/breeze/icons/places/22/mail-folder-outbox-inverted.svg b/icons/breeze/icons/places/22/mail-folder-outbox-inverted.svg new file mode 100644 index 00000000..4598bc14 --- /dev/null +++ b/icons/breeze/icons/places/22/mail-folder-outbox-inverted.svg @@ -0,0 +1,13 @@ + + + + + + diff --git a/icons/breeze/icons/places/22/mail-folder-outbox.svg b/icons/breeze/icons/places/22/mail-folder-outbox.svg new file mode 100644 index 00000000..239bc187 --- /dev/null +++ b/icons/breeze/icons/places/22/mail-folder-outbox.svg @@ -0,0 +1,13 @@ + + + + + + diff --git a/icons/copybreeze.sh b/icons/copybreeze.sh index 6c6d8103..2d13c1f6 100755 --- a/icons/copybreeze.sh +++ b/icons/copybreeze.sh @@ -22,6 +22,7 @@ wantedIcons = [ "mail-mark-important.svg", "mail-mark-unread-new.svg", "mail-reply-sender.svg", + "mail-folder-outbox.svg", "network-disconnect.svg", "view-refresh.svg", "go-down.svg", -- cgit v1.2.3