@@ -27,6 +27,9 @@ Showable {
27 // This is the block of text displayed below the header
27 // This is the block of text displayed below the header
28 property alias text: textLabel.text
28 property alias text: textLabel.text
30+ // This is the block of text displayed during an error
31+ property alias errorText: errorLabel.text
30 // Whether animations are paused
33 // Whether animations are paused
31 property bool paused
34 property bool paused
@@ -57,6 +60,10 @@ Showable {
58 signal finished()
61 signal finished()
63+ function showError() {
62 shown: false
69 shown: false
@@ -99,6 +106,11 @@ Showable {
102 MouseArea { // eat any errant presses
114 MouseArea { // eat any errant presses
103 id: mouseArea
115 id: mouseArea
104 anchors.fill: parent
116 anchors.fill: parent
@@ -128,7 +140,6 @@ Showable {
128 wrapMode: Text.Wrap
140 wrapMode: Text.Wrap
129 font.weight: Font.Light
141 font.weight: Font.Light
130 font.pixelSize: units.gu(3.5)
142 font.pixelSize: units.gu(3.5)
@@ -144,7 +155,22 @@ Showable {
144 wrapMode: Text.Wrap
155 wrapMode: Text.Wrap
145 font.weight: Font.Light
156 font.weight: Font.Light
146 font.pixelSize: units.gu(2.5)
157 font.pixelSize: units.gu(2.5)
147− text: root.text
158+ }
163+ top: parent.verticalCenter
164+ topMargin: d.verticalOffset + root.textYOffset
166+ leftMargin: d.sideMargin + d.textXOffset
168+ width: parent.width - d.sideMargin * 2
169+ horizontalAlignment: Text.AlignLeft
171+ font.weight: Font.Light
172+ font.pixelSize: units.gu(3.5)
150 // A place for subclasses to add extra widgets
176 // A place for subclasses to add extra widgets
@@ -153,4 +179,37 @@ Showable {
153 anchors.fill: parent
179 anchors.fill: parent
185+ when: errorTimer.running
186+ PropertyChanges { target: titleLabel; opacity: 0 }
187+ PropertyChanges { target: textLabel; opacity: 0 }
188+ PropertyChanges { target: errorLabel; opacity: 1 }
191+ transitions: Transition {
194+ SequentialAnimation {
195+ id: showErrorAnimation
200+ duration: UbuntuAnimation.BriskDuration
205+ duration: UbuntuAnimation.BriskDuration
211+ duration: UbuntuAnimation.BriskDuration