forked from ernesst/ActivityTracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmptyState.qml
More file actions
43 lines (36 loc) · 1.01 KB
/
EmptyState.qml
File metadata and controls
43 lines (36 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import QtQuick 2.4
import Ubuntu.Components 1.3
/*
Component which displays an empty state (approved by design). It offers an
icon, title and subtitle to describe the empty state.
*/
Item {
id: emptyState
// Public APIs
property alias iconName: emptyIcon.name
property alias iconSource: emptyIcon.source
property alias iconColor: emptyIcon.color
property alias title: emptyLabel.text
property alias subTitle: emptySublabel.text
height: childrenRect.height
Icon {
id: emptyIcon
anchors.horizontalCenter: parent.horizontalCenter
height: units.gu(10)
width: height
color: "#BBBBBB"
}
Label {
id: emptyLabel
anchors.top: emptyIcon.bottom
anchors.topMargin: units.gu(5)
anchors.horizontalCenter: parent.horizontalCenter
fontSize: "large"
font.bold: true
}
Label {
id: emptySublabel
anchors.top: emptyLabel.bottom
anchors.horizontalCenter: parent.horizontalCenter
}
}