Unity 8
 All Classes Functions Properties
RemoveBackground.qml
1 /*
2  * Copyright 2013 Canonical Ltd.
3  *
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.
7  *
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.
12  *
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/>.
15  */
16 
17 import QtQuick 2.0
18 import Ubuntu.Components 0.1
19 
20 Rectangle {
21  anchors.fill: parent
22  color: "#333130"
23  Label {
24  id: backgroundText
25 
26  anchors.fill: parent
27  verticalAlignment: Text.AlignVCenter
28  text: "Clear"
29  fontSize: "medium"
30  color: "#e8e1d0"
31  font.bold: true
32  }
33 
34  states: [
35  State {
36  name: "SwipingRight"
37  PropertyChanges {
38  target: backgroundText
39  anchors.rightMargin: units.gu(3)
40  anchors.leftMargin: 0
41  horizontalAlignment: Text.AlignRight
42 
43  }
44  },
45  State {
46  name: "SwipingLeft"
47  PropertyChanges {
48  target: backgroundText
49  anchors.rightMargin: 0
50  anchors.leftMargin: units.gu(3)
51  horizontalAlignment: Text.AlignLeft
52  }
53  }
54  ]
55 }