From 844809b53905f0cd22af354a994d582a19f2c60f Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Sat, 10 Dec 2016 23:23:13 +0100 Subject: focus composer: remover 'stairs' as demanded by jens --- components/package/contents/ui/FocusComposer.qml | 143 ++++++++--------------- 1 file changed, 49 insertions(+), 94 deletions(-) (limited to 'components/package/contents') diff --git a/components/package/contents/ui/FocusComposer.qml b/components/package/contents/ui/FocusComposer.qml index b5bb5c35..8b7c2db9 100644 --- a/components/package/contents/ui/FocusComposer.qml +++ b/components/package/contents/ui/FocusComposer.qml @@ -1,20 +1,20 @@ /* - 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 2 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. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ + * 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 2 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. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ import QtQuick 2.4 import QtQuick.Layouts 1.1 @@ -70,25 +70,12 @@ Controls2.Popup { anchors.fill: parent - Controls2.TextField { - id: subject - - Layout.fillWidth: true - - placeholderText: "Enter Subject..." - - text: composer.subject - - onTextChanged: { - composer.subject = text; - } - } - GridLayout { columns: 2 Controls2.Label { + Layout.alignment: Qt.AlignVCenter | Qt.AlignRight text: "To" } @@ -110,8 +97,8 @@ Controls2.Popup { Controls2.Label { + Layout.alignment: Qt.AlignVCenter | Qt.AlignRight text: "Cc" - visible: cc.visible } @@ -135,8 +122,8 @@ Controls2.Popup { } Controls2.Label { + Layout.alignment: Qt.AlignVCenter | Qt.AlignRight text: "Bcc" - visible: bcc.visible } @@ -158,93 +145,61 @@ Controls2.Popup { composer.recepientSearchString = searchTerm } } - } - RowLayout { Controls2.Label { - text: "Sending as" + text: "From" } - Controls2.ComboBox { - id: identityCombo - model: composer.identityModel - textRole: "displayName" + RowLayout { - Layout.fillWidth: true + Controls2.ComboBox { + id: identityCombo + model: composer.identityModel + textRole: "displayName" - onCurrentIndexChanged: { - composer.currentIdentityIndex = currentIndex - } - } - - Controls2.Button { - id: ccButton + Layout.fillWidth: true - text: "Cc" - - onClicked: { - cc.visible = true - ccButton.visible = false + onCurrentIndexChanged: { + composer.currentIdentityIndex = currentIndex + } } - } - - Controls2.Button { - id: bccButton - text: "Bcc" + Controls2.Button { + id: ccButton - onClicked: { - bcc.visible = true - bccButton.visible = false + text: "Cc" + onClicked: { + cc.visible = true + ccButton.visible = false + } } - } - } - /* - Item { - - Layout.fillWidth: true - - height: subject.height * 1.5 - - Controls2.Button { - - anchors { - bottom: parent.bottom - right: parent.right - } + Controls2.Button { + id: bccButton - text: "Attach" + text: "Bcc" - onClicked: { - fileDialog.open(); + onClicked: { + bcc.visible = true + bccButton.visible = false + } } } } - RowLayout { + Controls2.TextField { + id: subject Layout.fillWidth: true - Repeater { - - model: composer.attachments - - delegate: Controls2.Label { - id: name - - text: modelData - - Rectangle { + placeholderText: "Enter Subject..." - anchors.fill: parent + text: composer.subject - color: "lightsteelblue" - } - } + onTextChanged: { + composer.subject = text; } } - */ Controls2.TextArea { id: content -- cgit v1.2.3