2
* Copyright 2016 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by Jonas G. Drange <jonas.drange@canonical.com>
20
import Ubuntu.Components 1.3
25
property string initialText
27
readonly property alias text: label.text
30
signal slideCompleted()
32
Component.onCompleted: origX = label.x
34
function setText(text, noAnimation) {
35
if (noAnimation === true) {
40
function outStoppedHandler () {
42
label.x = units.gu(50)
44
outAnim.stopped.disconnect(outStoppedHandler);
46
outAnim.stopped.connect(outStoppedHandler);
53
font.pixelSize: units.gu(3.3)
54
horizontalAlignment: Text.AlignLeft
58
wrapMode: Text.WordWrap
65
duration: UbuntuAnimation.FastDuration
66
easing: UbuntuAnimation.StandardEasing
67
onStarted: root.slideStarted()
77
duration: UbuntuAnimation.FastDuration
78
easing: UbuntuAnimation.StandardEasing
79
onStopped: root.slideCompleted()