Dekko
Loading...
Searching...
No Matches
RecipientInputContextMenu.qml
1/* Copyright (C) 2016 - 2017 Dan Chapman <dpniel@ubuntu.com>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18import QtQuick 2.4
19import QtQuick.Controls.Suru 2.2
20import Lomiri.Components 1.3
21import Lomiri.Components.Popups 1.3
22import Dekko.Mail 1.0
23import Dekko.Mail.API 1.0
24import Dekko.Mail.Stores.Composer 1.0
26Popover {
27 id: info
28 property int recipientType: RecipientType.To
29
30 contentHeight: col.height
31 contentWidth: units.gu(20)
32
33 QtObject {
34 id: d
35 readonly property bool isToField: recipientType === RecipientType.To
36 }
37
38 LomiriShape {
39 aspect: LomiriShape.DropShadow
40 color: Suru.secondaryBackgroundColor
41 width: units.gu(20)
42 height: col.height
43 Column {
44 id: col
45 anchors {
46 left: parent.left
47 top: parent.top
48 right: parent.right
49 }
50 ListItem {
51 visible: !ComposerStore.showCC
52 height: ccl.height
53 ListItemLayout {
54 id: ccl
55 height: units.gu(6)
56 title.text: qsTr("Add CC")
57 }
58 onClicked: {
59 ComposerActions.addCC()
60 PopupUtils.close(info)
61 }
62 }
63 ListItem {
64 visible: !ComposerStore.showBCC
65 height: bccl.height
66 ListItemLayout {
67 id: bccl
68 height: units.gu(6)
69 title.text: qsTr("Add BCC")
70 }
71 onClicked: {
72 ComposerActions.addBCC()
73 PopupUtils.close(info)
74 }
75 }
76 }
77 }
78}
79