~pkunal-parmar/ubuntu-calendar-app/ICalImport

« back to all changes in this revision

Viewing changes to ViewHeader.qml

  • Committer: Tarmac
  • Author(s): Olivier Tilloy
  • Date: 2013-09-03 15:28:32 UTC
  • mfrom: (98.2.2 fix-ap-test-assumption)
  • Revision ID: tarmac-20130903152832-p8fp3lnggz6w39w3
Do not assume there will always be a label with the given text.

Approved by Ubuntu Phone Apps Jenkins Bot, Kunal Parmar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2013-2014 Canonical Ltd
3
 
 *
4
 
 * This file is part of Ubuntu Calendar App
5
 
 *
6
 
 * Ubuntu Calendar 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 Calendar 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
 
import QtQuick 2.3
19
 
import Ubuntu.Components 1.1
20
 
 
21
 
Item{
22
 
    id: header
23
 
    width: parent.width
24
 
    height: monthLabel.height
25
 
 
26
 
    property int month;
27
 
    property int year;
28
 
 
29
 
    property string monthLabelFontSize: "x-large"
30
 
    property string yearLabelFontSize: "large"
31
 
 
32
 
    Label{
33
 
        id: monthLabel
34
 
        objectName: "monthLabel"
35
 
        fontSize: monthLabelFontSize
36
 
        text: Qt.locale().standaloneMonthName(month)
37
 
        anchors.leftMargin: units.gu(1)
38
 
        anchors.left: parent.left
39
 
        color:"black"
40
 
        anchors.verticalCenter: parent.verticalCenter
41
 
    }
42
 
 
43
 
    Label{
44
 
        id: yearLabel
45
 
        objectName: "yearLabel"
46
 
        fontSize: yearLabelFontSize
47
 
        text: year
48
 
        anchors.right: parent.right
49
 
        anchors.rightMargin: units.gu(1)
50
 
        color:"black"
51
 
        anchors.verticalCenter: parent.verticalCenter
52
 
    }
53
 
}