summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2017-04-04 10:27:24 +0200
committerMichael Bohlender <michael.bohlender@kdemail.net>2017-04-04 10:27:24 +0200
commit1d4952b09a48c6107497cc37d644b231fd5b22eb (patch)
treeee7801fe525dd64e09276b41c49786a34ebb673a
parenta29c865be92ed19dd9bbc4697279ff35cebd50b8 (diff)
downloadkube-1d4952b09a48c6107497cc37d644b231fd5b22eb.tar.gz
kube-1d4952b09a48c6107497cc37d644b231fd5b22eb.zip
add positivebutton component
-rw-r--r--components/mail/contents/ui/Mail.qml7
-rw-r--r--components/package/contents/ui/PositiveButton.qml47
-rw-r--r--components/qmldir1
3 files changed, 52 insertions, 3 deletions
diff --git a/components/mail/contents/ui/Mail.qml b/components/mail/contents/ui/Mail.qml
index af006c1b..6a450d7f 100644
--- a/components/mail/contents/ui/Mail.qml
+++ b/components/mail/contents/ui/Mail.qml
@@ -209,17 +209,18 @@ Controls2.ApplicationWindow {
209 } 209 }
210 } 210 }
211 211
212 KubeComponents.Button { 212 KubeComponents.PositiveButton {
213 id: newMailButton 213 id: newMailButton
214
214 anchors { 215 anchors {
215 top: toolBar.bottom 216 top: toolBar.bottom
216 left: parent.left 217 left: parent.left
217 right: parent.right 218 right: parent.right
218 margins: KubeTheme.Units.largeSpacing 219 margins: KubeTheme.Units.largeSpacing
219 } 220 }
220 color: KubeTheme.Colors.positveColor 221
221 height: KubeTheme.Units.gridUnit * 1.5
222 text: qsTr("New Email") 222 text: qsTr("New Email")
223
223 onClicked: { 224 onClicked: {
224 composer.open() 225 composer.open()
225 } 226 }
diff --git a/components/package/contents/ui/PositiveButton.qml b/components/package/contents/ui/PositiveButton.qml
new file mode 100644
index 00000000..83063668
--- /dev/null
+++ b/components/package/contents/ui/PositiveButton.qml
@@ -0,0 +1,47 @@
1/*
2 * Copyright (C) 2017 Michael Bohlender, <bohlender@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 QtQuick.Controls 2.1 as Controls
21import org.kube.components.theme 1.0 as KubeTheme
22
23Controls.AbstractButton {
24 id: root
25
26 width: mainText.implicitWidth + KubeTheme.Units.largeSpacing * 2
27 height: mainText.implicitHeight + KubeTheme.Units.smallSpacing * 2
28
29 clip: true
30
31 Rectangle {
32 id: background
33
34 anchors.fill: parent
35
36 color: KubeTheme.Colors.positveColor
37 }
38
39 Text {
40 id: mainText
41
42 anchors.centerIn: parent
43
44 color: KubeTheme.Colors.highlightedTextColor
45 text: root.text
46 }
47}
diff --git a/components/qmldir b/components/qmldir
index 90379baf..a1c09b87 100644
--- a/components/qmldir
+++ b/components/qmldir
@@ -14,3 +14,4 @@ People 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 16Button 1.0 Button.qml
17PositiveButton 1.0 PositiveButton.qml