~ubuntu-clock-dev/ubuntu-clock-app/trunk

« back to all changes in this revision

Viewing changes to app/components/EmptyState.qml

  • Committer: Tarmac
  • Author(s): Dennis O'Flaherty
  • Date: 2014-09-12 20:32:12 UTC
  • mfrom: (85.1.11 ubuntu-clock-app)
  • Revision ID: tarmac-20140912203212-ucm686qd57bz0ove
Added an empty alarm state to indicate that there are no saved alarms. Fixes: https://bugs.launchpad.net/bugs/1364555.

Approved by PS Jenkins bot, Nekhelesh Ramananthan.

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
Item {
 
23
 
 
24
    property alias iconName: emptyIcon.name
 
25
    property alias title: emptyLabel.text
 
26
    property alias subTitle: emptySublabel.text
 
27
 
 
28
    height: childrenRect.height
 
29
    width: parent.width
 
30
 
 
31
    Icon {
 
32
        id: emptyIcon
 
33
        anchors.horizontalCenter: parent.horizontalCenter
 
34
        height: units.gu(10)
 
35
        width: height
 
36
        color: "#BBBBBB"
 
37
    }
 
38
 
 
39
    Label {
 
40
        id: emptyLabel
 
41
        anchors.top: emptyIcon.bottom
 
42
        anchors.topMargin: units.gu(5)
 
43
        anchors.horizontalCenter: parent.horizontalCenter
 
44
        fontSize: "large"
 
45
        font.bold: true
 
46
    }
 
47
 
 
48
    Label {
 
49
        id: emptySublabel
 
50
        anchors.top: emptyLabel.bottom
 
51
        anchors.horizontalCenter: parent.horizontalCenter
 
52
    }
 
53
}