~verzegnassi-stefano/+junk/docviewer-tmp-001

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Stefano Verzegnassi
  • Date: 2015-01-21 18:37:55 UTC
  • mfrom: (48.2.1 ubuntu-docviewer-app)
  • Revision ID: tarmac-20150121183755-carz93q9aruvb2x8
Added Empty State in Welcome screen. Fixes: https://bugs.launchpad.net/bugs/1395065.

Approved by Andrew Hayzen, Nekhelesh Ramananthan, Ubuntu Phone Apps Jenkins Bot.

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.3
 
20
import Ubuntu.Components 1.1
 
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.horizontalCenter: parent.horizontalCenter
 
58
    }
 
59
}