19import QtQuick.Controls.Suru 2.2
20import Lomiri.Components 1.3
21import Lomiri.Components.Popups 1.3
22import Dekko.Components 1.0
24import Dekko.Mail.API 1.0
25import Dekko.Mail.Stores.Composer 1.0
26import Dekko.Lomiri.Components 1.0
27import Dekko.Lomiri.Constants 1.0
32 readonly property int maxHeight: units.gu(70)
33 readonly property int maxWidth: units.gu(100)
37 color: Suru.secondaryForegroundColor
42 readonly property bool shouldCenter: height === base.maxHeight
43 readonly property bool addTopMargin: height > units.gu(40)
44 aspect: LomiriShape.DropShadow
45 width: Math.min((parent.width / 3)*2, base.maxWidth)
46 height: Math.min((parent.height / 5)*4, base.maxHeight)
48 horizontalCenter: parent.horizontalCenter
49 top: shouldCenter ? undefined : parent.top
50 topMargin: shouldCenter ? undefined : (addTopMargin ? units.gu(6) : Style.defaultSpacing)
51 verticalCenter: shouldCenter ? parent.verticalCenter : undefined
53 color: Suru.secondaryBackgroundColor
65 implicitHeight: height
69 anchors.leftMargin: units.gu(1)
70 anchors.rightMargin: units.gu(1)
74 anchors.verticalCenter: parent.verticalCenter
75 action: ComposerStore.actions.discardMessageAction
79 anchors.verticalCenter: parent.verticalCenter
80 action: ComposerStore.actions.saveDraftAction
85 anchors.verticalCenter: parent.verticalCenter
86 action: ComposerStore.actions.attachmentsAction
91 anchors.verticalCenter: parent.verticalCenter
93 text: qsTr("Contacts")
95 onTriggered: PopupUtils.open(Qt.resolvedUrl(
"./ComposerOverflowMenu.qml"), base)
103 anchors.verticalCenter: parent.verticalCenter
104 action: ComposerStore.actions.sendAction
110 bottom: parent.bottom
121 color: Suru.backgroundColor
128 implicitHeight: parent.height
142 implicitHeight: height
146 leftMargin:
Style.defaultSpacing
147 verticalCenter: parent.verticalCenter
150 text:
"TODO: background status' like \"Saving draft....\""
156 enabled: composer.isLargeFF
157 filter: ViewKeys.closeComposer
159 PopupUtils.close(base)