summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-03 12:59:21 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-03 12:59:21 +0200
commitbc7a2ceabb8836a668d14f3dbf3731997921c7e7 (patch)
tree46def1d1ea370582da7f510d5874a6c78085369f
parentd3490fee9d19bbf9436968f05a78f3a619ae8616 (diff)
downloadkube-bc7a2ceabb8836a668d14f3dbf3731997921c7e7.tar.gz
kube-bc7a2ceabb8836a668d14f3dbf3731997921c7e7.zip
A Button
-rw-r--r--components/mail/contents/ui/Mail.qml24
-rw-r--r--components/package/contents/ui/Button.qml41
-rw-r--r--components/qmldir1
3 files changed, 46 insertions, 20 deletions
diff --git a/components/mail/contents/ui/Mail.qml b/components/mail/contents/ui/Mail.qml
index 3978098f..a1ff1cb8 100644
--- a/components/mail/contents/ui/Mail.qml
+++ b/components/mail/contents/ui/Mail.qml
@@ -210,35 +210,19 @@ Controls2.ApplicationWindow {
210 } 210 }
211 } 211 }
212 212
213 Rectangle { 213 KubeComponents.Button {
214 id: newMailButton 214 id: newMailButton
215
216 anchors { 215 anchors {
217 top: toolBar.bottom 216 top: toolBar.bottom
218 left: parent.left 217 left: parent.left
219 right: parent.right 218 right: parent.right
220 margins: Kirigami.Units.largeSpacing 219 margins: Kirigami.Units.largeSpacing
221 } 220 }
222
223 color: KubeTheme.Colors.positveColor 221 color: KubeTheme.Colors.positveColor
224 clip: true
225
226 height: Kirigami.Units.gridUnit * 1.5 222 height: Kirigami.Units.gridUnit * 1.5
227 223 text: qsTr("New Email")
228 Text { 224 onClicked: {
229 anchors.centerIn: parent 225 composer.open()
230
231 text: qsTr("New Email")
232 color: KubeTheme.Colors.highlightedTextColor
233 }
234 //iconName: "mail-message-new"
235 //Controls2.Tooltip.text: "compose new email"
236
237 MouseArea {
238 anchors.fill: parent
239 onClicked: {
240 composer.open()
241 }
242 } 226 }
243 } 227 }
244 228
diff --git a/components/package/contents/ui/Button.qml b/components/package/contents/ui/Button.qml
new file mode 100644
index 00000000..ceb8d0c3
--- /dev/null
+++ b/components/package/contents/ui/Button.qml
@@ -0,0 +1,41 @@
1/*
2 * Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsys.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19import QtQuick 2.7
20import org.kube.components.theme 1.0 as KubeTheme
21
22Rectangle {
23 id: root
24
25 signal clicked()
26 property alias text: text.text
27 property color textColor: KubeTheme.Colors.highlightedTextColor
28
29 clip: true
30
31 Text {
32 id: text
33 anchors.centerIn: parent
34 color: root.textColor
35 }
36
37 MouseArea {
38 anchors.fill: parent
39 onClicked: root.clicked()
40 }
41}
diff --git a/components/qmldir b/components/qmldir
index 24c93d94..90379baf 100644
--- a/components/qmldir
+++ b/components/qmldir
@@ -13,3 +13,4 @@ Outbox 1.0 Outbox.qml
13People 1.0 People.qml 13People 1.0 People.qml
14Notification 1.0 Notification.qml 14Notification 1.0 Notification.qml
15Icon 1.0 Icon.qml 15Icon 1.0 Icon.qml
16Button 1.0 Button.qml