2
* Copyright 2015 Canonical Ltd.
4
* This file is part of webbrowser-app.
6
* webbrowser-app is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* webbrowser-app 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.
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/>.
20
import Ubuntu.Components 1.3
25
property real progress
26
property bool indeterminateProgress: false
29
color: Theme.palette.normal.base
35
anchors.left: parent.left
37
anchors.top: parent.top
38
color: UbuntuColors.orange
39
width: indeterminateProgress ? parent.width / 6 : (progress / 100) * parent.width
42
running: indeterminateProgress
44
currentProgress.anchors.leftMargin = 0;
46
loops: Animation.Infinite
47
PropertyAnimation { target: currentProgress.anchors; property: "leftMargin"; from: 0.0; to: parent.width - parent.width / 6; duration: UbuntuAnimation.SleepyDuration; easing.type: Easing.InOutQuad; }
48
PropertyAnimation { target: currentProgress.anchors; property: "leftMargin"; from: parent.width - parent.width / 6; to: 0; duration: UbuntuAnimation.SleepyDuration; easing.type: Easing.InOutQuad; }