Dekko
Loading...
Searching...
No Matches
WizardStepper.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
22Item {
23 height: units.gu(5)
24 property Action previousAction
25 property Action nextAction
26
27 anchors {
28 left: parent.left
29 right: parent.right
30 }
31 AbstractButton {
32 objectName: "wizardStepBack"
33 height: parent.height
34 width: backLabel.width + units.gu(4)
35 anchors.left: parent.left
36 Rectangle {
37 anchors.fill: parent
38 color: Suru.neutralColor
39 visible: parent.pressed
40 }
41 Icon {
42 id: bkIcon
43 height: units.gu(1.5)
44 width: height
45 name: "back"
46 anchors {
47 left: parent.left
48 verticalCenter: parent.verticalCenter
49 }
50 }
51
52 Label {
53 id: backLabel
54 text: previousAction.text
55 anchors {
56 left: bkIcon.right
57 leftMargin: units.gu(0.5)
58 verticalCenter: parent.verticalCenter
59 }
60 }
61 onClicked: previousAction.trigger()
62 }
63
64 AbstractButton {
65 objectName: "wizardStepNext"
66 height: parent.height
67 width: nxtLabel.width + units.gu(4)
68 anchors.right: parent.right
69 Rectangle {
70 anchors.fill: parent
71 color: Suru.neutralColor
72 visible: parent.pressed
73 }
74 Icon {
75 id: nxtIcon
76 height: units.gu(1.5)
77 width: height
78 name: "next"
79 anchors {
80 right: parent.right
81 verticalCenter: parent.verticalCenter
82 }
83 }
84
85 Label {
86 id: nxtLabel
87 text: nextAction.text
88 anchors {
89 right: nxtIcon.left
90 rightMargin: units.gu(0.5)
91 verticalCenter: parent.verticalCenter
92 }
93 }
94 onClicked: nextAction.trigger()
95 }
96}
97