~bhdouglass/ubuntu-touch-tweak-tool/fix-disappearing-options

« back to all changes in this revision

Viewing changes to src/app/qml/components/EmptyState.qml

  • Committer: Stefano Verzegnassi
  • Date: 2016-04-16 17:04:08 UTC
  • Revision ID: stefano92.100@gmail.com-20160416170408-t0ck3hoi0qifmehw
Stable codebase for 0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2014 Canonical Ltd
 
3
 *
 
4
 * This file is part of Ubuntu Clock App
 
5
 *
 
6
 * Ubuntu Clock App is free software: you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License version 3 as
 
8
 * published by the Free Software Foundation.
 
9
 *
 
10
 * Ubuntu Clock 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.
 
14
 *
 
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/>.
 
17
 */
 
18
 
 
19
import QtQuick 2.4
 
20
import Ubuntu.Components 1.3
 
21
 
 
22
/*
 
23
 Component which displays an empty state (approved by design). It offers an
 
24
 icon, title and subtitle to describe the empty state.
 
25
*/
 
26
 
 
27
Item {
 
28
    id: emptyState
 
29
 
 
30
    // Public APIs
 
31
    property alias iconName: emptyIcon.name
 
32
    property alias title: emptyLabel.text
 
33
    property alias subTitle: emptySublabel.text
 
34
 
 
35
    height: childrenRect.height
 
36
 
 
37
    Icon {
 
38
        id: emptyIcon
 
39
        anchors.horizontalCenter: parent.horizontalCenter
 
40
        height: units.gu(10)
 
41
        width: height
 
42
        color: "#BBBBBB"
 
43
    }
 
44
 
 
45
    Label {
 
46
        id: emptyLabel
 
47
        anchors.top: emptyIcon.bottom
 
48
        anchors.topMargin: units.gu(5)
 
49
        anchors.horizontalCenter: parent.horizontalCenter
 
50
        fontSize: "large"
 
51
        font.bold: true
 
52
    }
 
53
 
 
54
    Label {
 
55
        id: emptySublabel
 
56
        anchors.top: emptyLabel.bottom
 
57
        anchors.left: parent.left
 
58
        anchors.right: parent.right
 
59
        anchors.leftMargin: units.gu(4)
 
60
        anchors.rightMargin: units.gu(4)
 
61
 
 
62
        wrapMode: Text.Wrap
 
63
        horizontalAlignment: Text.AlignHCenter
 
64
    }
 
65
}