From 4c1f62bceff8db26da6d0354b29438c3294e2522 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 4 Apr 2017 07:22:50 +0200 Subject: use theme --- .../package/contents/ui/ConversationView.qml | 64 ++++++++-------- components/package/contents/ui/MailListView.qml | 22 +++--- components/package/contents/ui/People.qml | 88 +++++++++++----------- 3 files changed, 86 insertions(+), 88 deletions(-) (limited to 'components/package/contents/ui') diff --git a/components/package/contents/ui/ConversationView.qml b/components/package/contents/ui/ConversationView.qml index 728b81de..4196ebbd 100644 --- a/components/package/contents/ui/ConversationView.qml +++ b/components/package/contents/ui/ConversationView.qml @@ -84,13 +84,13 @@ Rectangle { } header: Item { - height: Kirigami.Units.gridUnit * 0.5 + height: KubeTheme.Units.gridUnit * 0.5 width: parent.width } footer: Item { - height: Kirigami.Units.gridUnit + height: KubeTheme.Units.gridUnit width: parent.width } @@ -185,14 +185,14 @@ Rectangle { } } - height: sheet.height + Kirigami.Units.gridUnit + height: sheet.height + KubeTheme.Units.gridUnit width: parent.width Rectangle { id: sheet anchors.centerIn: parent - implicitHeight: header.height + attachments.height + body.height + incompleteBody.height + footer.height + Kirigami.Units.largeSpacing - width: parent.width - Kirigami.Units.gridUnit * 2 + implicitHeight: header.height + attachments.height + body.height + incompleteBody.height + footer.height + KubeTheme.Units.largeSpacing + width: parent.width - KubeTheme.Units.gridUnit * 2 //Overlay for non-active mails Rectangle { @@ -213,10 +213,10 @@ Rectangle { top: parent.top left: parent.left right: parent.right - margins: Kirigami.Units.largeSpacing + margins: KubeTheme.Units.largeSpacing } - height: headerContent.height + Kirigami.Units.smallSpacing + height: headerContent.height + KubeTheme.Units.smallSpacing states: [ State { @@ -262,7 +262,7 @@ Rectangle { horizontalCenter: parent.horizontalCenter } - //spacing: Kirigami.Units.smallSpacing + //spacing: KubeTheme.Units.smallSpacing width: parent.width @@ -271,7 +271,7 @@ Rectangle { width: parent.width - spacing: Kirigami.Units.smallSpacing + spacing: KubeTheme.Units.smallSpacing clip: true Text { @@ -288,7 +288,7 @@ Rectangle { text: model.sender - width: parent.width - senderName.width - date_label.width - Kirigami.Units.largeSpacing + width: parent.width - senderName.width - date_label.width - KubeTheme.Units.largeSpacing elide: Text.ElideRight color: KubeTheme.Colors.textColor @@ -315,7 +315,7 @@ Rectangle { Text { id: recipients - width: parent.width - goDown.width - Kirigami.Units.smallSpacing + width: parent.width - goDown.width - KubeTheme.Units.smallSpacing text:"to: "+ model.to + " " + model.cc + " " + model.bcc @@ -328,7 +328,7 @@ Rectangle { Text { id: to - width: parent.width - goDown.width - Kirigami.Units.smallSpacing + width: parent.width - goDown.width - KubeTheme.Units.smallSpacing text:"to: " + model.to @@ -340,7 +340,7 @@ Rectangle { Text { id: cc - width: parent.width - goDown.width - Kirigami.Units.smallSpacing + width: parent.width - goDown.width - KubeTheme.Units.smallSpacing text:"cc: " + model.cc @@ -352,7 +352,7 @@ Rectangle { Text { id: bcc - width: parent.width - goDown.width - Kirigami.Units.smallSpacing + width: parent.width - goDown.width - KubeTheme.Units.smallSpacing text:"bcc: " + model.bcc @@ -369,7 +369,7 @@ Rectangle { right: seperator.right } - height: Kirigami.Units.gridUnit + height: KubeTheme.Units.gridUnit width: height color: KubeTheme.Colors.backgroundColor @@ -377,7 +377,7 @@ Rectangle { Controls1.ToolButton { anchors.fill: parent - iconName: "go-down" + iconName: KubeTheme.Icons.goDown } } @@ -387,7 +387,7 @@ Rectangle { right: seperator.right } - height: Kirigami.Units.gridUnit + height: KubeTheme.Units.gridUnit width: height color: KubeTheme.Colors.backgroundColor @@ -395,7 +395,7 @@ Rectangle { Controls1.ToolButton { anchors.fill: parent - iconName: header.state === "details" ? "go-up" : "go-down" + iconName: header.state === "details" ? KubeTheme.Icons.goUp : KubeTheme.Icons.goDown onClicked: { header.state === "details" ? header.state = "small" : header.state = "details" @@ -425,14 +425,14 @@ Rectangle { anchors { top: header.bottom - topMargin: Kirigami.Units.smallSpacing + topMargin: KubeTheme.Units.smallSpacing right: header.right } - width: header.width - Kirigami.Units.largeSpacing + width: header.width - KubeTheme.Units.largeSpacing layoutDirection: Qt.RightToLeft - spacing: Kirigami.Units.smallSpacing + spacing: KubeTheme.Units.smallSpacing clip: true Repeater { @@ -456,12 +456,12 @@ Rectangle { top: header.bottom left: header.left right: header.right - leftMargin: Kirigami.Units.largeSpacing - rightMargin: Kirigami.Units.largeSpacing - topMargin: Math.max(attachments.height, Kirigami.Units.largeSpacing) + leftMargin: KubeTheme.Units.largeSpacing + rightMargin: KubeTheme.Units.largeSpacing + topMargin: Math.max(attachments.height, KubeTheme.Units.largeSpacing) } - width: header.width - Kirigami.Units.largeSpacing * 2 + width: header.width - KubeTheme.Units.largeSpacing * 2 height: desiredHeight message: model.mimeMessage @@ -474,9 +474,9 @@ Rectangle { top: header.bottom left: header.left right: header.right - leftMargin: Kirigami.Units.largeSpacing - rightMargin: Kirigami.Units.largeSpacing - topMargin: Math.max(attachments.height, Kirigami.Units.largeSpacing) + leftMargin: KubeTheme.Units.largeSpacing + rightMargin: KubeTheme.Units.largeSpacing + topMargin: Math.max(attachments.height, KubeTheme.Units.largeSpacing) } visible: model.incomplete text: "Incomplete body..." @@ -498,14 +498,14 @@ Rectangle { anchors.bottom: parent.bottom - height: Kirigami.Units.gridUnit * 2 + height: KubeTheme.Units.gridUnit * 2 width: parent.width Text { anchors{ verticalCenter: parent.verticalCenter left: parent.left - leftMargin: Kirigami.Units.largeSpacing + leftMargin: KubeTheme.Units.largeSpacing } KubeFramework.MailController { @@ -535,7 +535,7 @@ Rectangle { anchors{ verticalCenter: parent.verticalCenter right: parent.right - rightMargin: Kirigami.Units.largeSpacing + rightMargin: KubeTheme.Units.largeSpacing } KubeAction.Context { @@ -558,7 +558,7 @@ Rectangle { context: maillistcontext } - iconName: model.draft ? "document-edit" : "mail-reply-sender" + iconName: model.draft ? KubeTheme.Icons.edit : KubeTheme.Icons.replyToSender onClicked: { if (model.draft) { editAction.execute() diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml index e7db006b..2d5d6601 100644 --- a/components/package/contents/ui/MailListView.qml +++ b/components/package/contents/ui/MailListView.qml @@ -21,9 +21,7 @@ import QtQuick.Controls 2.0 import QtQuick.Controls 1.4 as Controls import QtQuick.Layouts 1.1 -import org.kde.kirigami 1.0 as Kirigami import org.kube.components.theme 1.0 as KubeTheme - import org.kube.framework.domain 1.0 as KubeFramework Item { @@ -46,10 +44,10 @@ Item { Row { anchors.centerIn: parent - spacing: Kirigami.Units.smallSpacing + spacing: KubeTheme.Units.smallSpacing Controls.ToolButton { - iconName: "mail-mark-unread-new" + iconName: KubeTheme.Icons.markAsRead text: qsTr("Mark As Read") enabled: mailController.markAsReadAction.enabled tooltip: qsTr("mark mail as read") @@ -59,7 +57,7 @@ Item { } Controls.ToolButton { - iconName: "mail-mark-important" + iconName: KubeTheme.Icons.markImportant text: qsTr("Mark Important") enabled: mailController.markAsImportantAction.enabled tooltip: qsTr("mark mail as important") @@ -69,7 +67,7 @@ Item { } Controls.ToolButton { - iconName: "edit-delete" + iconName: KubeTheme.Icons.moveToTrash text: qsTr("Delete Mail") enabled: mailController.moveToTrashAction.enabled tooltip: qsTr("delete email") @@ -79,7 +77,7 @@ Item { } Controls.ToolButton { - iconName: "edit-undo" + iconName: KubeTheme.Icons.undo text: qsTr("Restore Mail") enabled: mailController.restoreFromTrashAction.enabled tooltip: qsTr("restore email") @@ -153,7 +151,7 @@ Item { property variant mail : model.domainObject width: scrollbar.visible ? listView.width - scrollbar.width : listView.width - height: Kirigami.Units.gridUnit * 5 + height: KubeTheme.Units.gridUnit * 5 states: [ State { @@ -231,14 +229,14 @@ Item { bottom: parent.bottom left: parent.left right: parent.right - margins: Kirigami.Units.smallSpacing + margins: KubeTheme.Units.smallSpacing } Column { anchors { verticalCenter: parent.verticalCenter left: parent.left - leftMargin: Kirigami.Units.largeSpacing + leftMargin: KubeTheme.Units.largeSpacing } Text{ @@ -248,7 +246,7 @@ Item { color: model.unread ? KubeTheme.Colors.highlightColor : KubeTheme.Colors.textColor maximumLineCount: 2 - width: content.width - Kirigami.Units.gridUnit * 3 + width: content.width - KubeTheme.Units.gridUnit * 3 wrapMode: Text.WrapAnywhere elide: Text.ElideRight } @@ -259,7 +257,7 @@ Item { text: model.senderName font.italic: true color: KubeTheme.Colors.textColor - width: delegateRoot.width - Kirigami.Units.gridUnit * 3 + width: delegateRoot.width - KubeTheme.Units.gridUnit * 3 elide: Text.ElideRight } } diff --git a/components/package/contents/ui/People.qml b/components/package/contents/ui/People.qml index 4b67b0f3..182cce94 100644 --- a/components/package/contents/ui/People.qml +++ b/components/package/contents/ui/People.qml @@ -49,7 +49,7 @@ Popup { anchors.verticalCenter: parent.verticalCenter - iconName: "go-previous" + iconName: KubeTheme.Icons.goBack onClicked: stack.pop() @@ -69,11 +69,11 @@ Popup { anchors { right: parent.right - rightMargin: Kirigami.Units.smallSpacing + rightMargin: KubeTheme.Units.smallSpacing verticalCenter: parent.verticalCenter } - iconName: "list-add-new" + iconName: KubeTheme.Icons.addNew } } @@ -117,13 +117,13 @@ Popup { anchors { top: parent.top - topMargin: Kirigami.Units.largeSpacing + topMargin: KubeTheme.Units.largeSpacing left: parent.left - leftMargin: Kirigami.Units.largeSpacing + leftMargin: KubeTheme.Units.largeSpacing } - spacing: Kirigami.Units.largeSpacing - width: peoplePageRoot.width - Kirigami.Units.largeSpacing * 2 + spacing: KubeTheme.Units.largeSpacing + width: peoplePageRoot.width - KubeTheme.Units.largeSpacing * 2 Repeater { @@ -134,8 +134,8 @@ Popup { delegate: Rectangle { id: delegateRoot - height: Kirigami.Units.gridUnit * 3 - width: Kirigami.Units.gridUnit * 10 + height: KubeTheme.Units.gridUnit * 3 + width: KubeTheme.Units.gridUnit * 10 border.width: 1 border.color: "lightgrey" @@ -164,12 +164,12 @@ Popup { anchors { left: avatarPlaceholder.right - margins: Kirigami.Units.smallSpacing + margins: KubeTheme.Units.smallSpacing verticalCenter: parent.verticalCenter } Text { - width: delegateRoot.width - avatarPlaceholder.width - Kirigami.Units.smallSpacing * 2 + width: delegateRoot.width - avatarPlaceholder.width - KubeTheme.Units.smallSpacing * 2 text: model.firstName elide: Text.ElideRight @@ -177,7 +177,7 @@ Popup { } Text { - width: delegateRoot.width - avatarPlaceholder.width - Kirigami.Units.smallSpacing * 2 + width: delegateRoot.width - avatarPlaceholder.width - KubeTheme.Units.smallSpacing * 2 text: model.lastName elide: Text.ElideRight @@ -210,7 +210,7 @@ Popup { anchors { top: parent.top left: parent.left - leftMargin: Kirigami.Units.largeSpacing + leftMargin: KubeTheme.Units.largeSpacing } width: parent.width @@ -231,17 +231,17 @@ Popup { width: personPageRoot.width - spacing: Kirigami.Units.largeSpacing + spacing: KubeTheme.Units.largeSpacing Item { width: parent.width - height: Kirigami.Units.smallSpacing + height: KubeTheme.Units.smallSpacing } Item { - height: Kirigami.Units.gridUnit * 8 - width: personPageRoot.width - Kirigami.Units.largeSpacing + height: KubeTheme.Units.gridUnit * 8 + width: personPageRoot.width - KubeTheme.Units.largeSpacing Rectangle { id: avatar @@ -258,7 +258,7 @@ Popup { anchors { top: avatar.top left: avatar.right - leftMargin: Kirigami.Units.largeSpacing + leftMargin: KubeTheme.Units.largeSpacing } text: contactController.name //"Michael Tester" @@ -270,7 +270,7 @@ Popup { anchors { top: nameLabel.bottom left: avatar.right - leftMargin: Kirigami.Units.largeSpacing + leftMargin: KubeTheme.Units.largeSpacing } text: "CIO" @@ -282,11 +282,11 @@ Popup { anchors { bottom: avatar.bottom left: avatar.right - leftMargin: Kirigami.Units.largeSpacing + leftMargin: KubeTheme.Units.largeSpacing } - height: Kirigami.Units.gridUnit * 3 - width: Kirigami.Units.gridUnit * 10 + height: KubeTheme.Units.gridUnit * 3 + width: KubeTheme.Units.gridUnit * 10 border.width: 1 border.color: "lightgrey" @@ -304,7 +304,7 @@ Popup { anchors { verticalCenter: av.verticalCenter left: av.right - leftMargin: Kirigami.Units.smallSpacing + leftMargin: KubeTheme.Units.smallSpacing } text: "Sauerkraut AG" @@ -317,65 +317,65 @@ Popup { Flow { id: emails - width: personPageRoot.width - Kirigami.Units.largeSpacing + width: personPageRoot.width - KubeTheme.Units.largeSpacing Repeater { model: contactController.emails Row { - spacing: Kirigami.Units.smallSpacing + spacing: KubeTheme.Units.smallSpacing Text { text: "(main)" } Text { text: modelData ; color: KubeTheme.Colors.highlightColor } - Item { width: Kirigami.Units.smallSpacing; height: 1 } + Item { width: KubeTheme.Units.smallSpacing; height: 1 } } } Row { - spacing: Kirigami.Units.smallSpacing + spacing: KubeTheme.Units.smallSpacing Text { text: "(alias)"} Text { text: "test.testerson@gmail.com"; color: KubeTheme.Colors.highlightColor } - Item { width: Kirigami.Units.smallSpacing; height: 1 } + Item { width: KubeTheme.Units.smallSpacing; height: 1 } } Row { - spacing: Kirigami.Units.smallSpacing + spacing: KubeTheme.Units.smallSpacing Text { text: "(private)"} Text { text: "test@gmail.com"; color: KubeTheme.Colors.highlightColor } - Item { width: Kirigami.Units.smallSpacing; height: 1 } + Item { width: KubeTheme.Units.smallSpacing; height: 1 } } } Flow { id: phone - width: personPageRoot.width - Kirigami.Units.largeSpacing - spacing: Kirigami.Units.smallSpacing + width: personPageRoot.width - KubeTheme.Units.largeSpacing + spacing: KubeTheme.Units.smallSpacing Row { - spacing: Kirigami.Units.smallSpacing + spacing: KubeTheme.Units.smallSpacing Text { text: "(inhouse)"} Text { text: "+49812324932"; opacity: 0.6 } - Item { width: Kirigami.Units.smallSpacing; height: 1 } + Item { width: KubeTheme.Units.smallSpacing; height: 1 } } Row { - spacing: Kirigami.Units.smallSpacing + spacing: KubeTheme.Units.smallSpacing Text { text: "(mobile)"} Text { text: "+49812324932"; opacity: 0.6 } - Item { width: Kirigami.Units.smallSpacing; height: 1 } + Item { width: KubeTheme.Units.smallSpacing; height: 1 } } Row { - spacing: Kirigami.Units.smallSpacing + spacing: KubeTheme.Units.smallSpacing Text { text: "(private)"} Text { text: "+49812324932"; opacity: 0.6 } - Item { width: Kirigami.Units.smallSpacing; height: 1 } + Item { width: KubeTheme.Units.smallSpacing; height: 1 } } } Column { id: address - width: personPageRoot.width - Kirigami.Units.largeSpacing + width: personPageRoot.width - KubeTheme.Units.largeSpacing Text { text: "Albertstrasse 35a"} Text { text: "81767 Teststadt"} @@ -386,7 +386,7 @@ Popup { // // width: parent.width // -// spacing: Kirigami.Units.smallSpacing +// spacing: KubeTheme.Units.smallSpacing // // Text { // @@ -396,7 +396,7 @@ Popup { // GroupGrid { // id: groups // -// width: root.width - Kirigami.Units.largeSpacing +// width: root.width - KubeTheme.Units.largeSpacing // // model: GroupModel1 {} // } @@ -406,7 +406,7 @@ Popup { // // width: parent.width // -// spacing: Kirigami.Units.smallSpacing +// spacing: KubeTheme.Units.smallSpacing // // Text { // id: commonPeopleLabel @@ -417,7 +417,7 @@ Popup { // PeopleGrid { // id: commonPeople // -// width: root.width - Kirigami.Units.largeSpacing +// width: root.width - KubeTheme.Units.largeSpacing // // model: PeopleModel2 {} // } @@ -425,7 +425,7 @@ Popup { Item { width: parent.width - height: Kirigami.Units.largeSpacing + height: KubeTheme.Units.largeSpacing } } } -- cgit v1.2.3