From fc1f6b2f4276f67008010e1f12e2eb1bf79da4a9 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Thu, 4 Feb 2016 13:59:30 +0100 Subject: Compoer + FocusComposer UI --- .../kube-mail/package/contents/ui/Composer.qml | 30 +++++-- .../package/contents/ui/FocusComposer.qml | 99 ++++++++++++++++++++++ .../kube-mail/package/contents/ui/main.qml | 10 ++- 3 files changed, 131 insertions(+), 8 deletions(-) create mode 100644 applications/kube-mail/package/contents/ui/FocusComposer.qml (limited to 'applications') diff --git a/applications/kube-mail/package/contents/ui/Composer.qml b/applications/kube-mail/package/contents/ui/Composer.qml index d32ee7c6..66305254 100644 --- a/applications/kube-mail/package/contents/ui/Composer.qml +++ b/applications/kube-mail/package/contents/ui/Composer.qml @@ -17,12 +17,24 @@ */ import QtQuick 2.4 -import QtQuick.Controls 1.3 +import QtQuick.Controls 1.4 import QtQuick.Layouts 1.1 Item { id: root + function send() { + + } + + function saveAsDraft() { + + } + + function clear() { + + } + ColumnLayout { anchors.fill: parent @@ -31,6 +43,16 @@ Item { columns: 2 + Label { + text: "From" + } + + ComboBox { + model: ["Kuberich ", "Uni ", "Spam "] + + Layout.fillWidth: true + } + Label { text: "To" } @@ -77,11 +99,5 @@ Item { Layout.fillHeight: true } - - RowLayout { - Button { - text: "Send" - } - } } } diff --git a/applications/kube-mail/package/contents/ui/FocusComposer.qml b/applications/kube-mail/package/contents/ui/FocusComposer.qml new file mode 100644 index 00000000..20899817 --- /dev/null +++ b/applications/kube-mail/package/contents/ui/FocusComposer.qml @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2016 Michael Bohlender + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +//import org.kde.kube.mail 1.0 as Mail + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +import QtQuick 2.4 +import QtQuick.Controls 1.4 +import QtQuick.Layouts 1.1 + +Rectangle { + id: root + + visible: false + + color: colorPalette.border + + opacity: 0.9 + + MouseArea { + anchors.fill: parent + + onClicked: { + root.visible = false + } + } + + Rectangle { + anchors.centerIn: parent + + height: root.height * 0.8 + width: root.width * 0.8 + + color: colorPalette.background + + MouseArea { + anchors.fill: parent + } + + ColumnLayout { + + anchors { + fill: parent + margins: unit.size * 3 + } + + Composer { + id: composer + + Layout.fillWidth: true + Layout.fillHeight: true + + } + + RowLayout { + Layout.fillWidth: true + + Button { + text: "Send" + + onClicked: { + composer.send() + root.visible = false + } + } + + Button { + text: "Save Draft" + + onClicked: { + composer.saveAsDraft() + root.visible = false + } + } + + Button { + text: "Discard" + + onClicked: { + composer.clear() + root.visible = false + } + } + } + } + } +} \ No newline at end of file diff --git a/applications/kube-mail/package/contents/ui/main.qml b/applications/kube-mail/package/contents/ui/main.qml index ef37ae19..c1e3fcc3 100644 --- a/applications/kube-mail/package/contents/ui/main.qml +++ b/applications/kube-mail/package/contents/ui/main.qml @@ -71,7 +71,9 @@ ApplicationWindow { height: parent.height iconName: "mail-message-new" text: "Compose" - enabled: false + onClicked: { + composer.visible = true + } } PlasmaComponents.ToolButton { @@ -131,6 +133,12 @@ ApplicationWindow { } + FocusComposer { + id: composer + + anchors.fill: parent + } + //TODO find a better way to scale UI Item { id: unit -- cgit v1.2.3