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

« back to all changes in this revision

Viewing changes to DayViewHeader.qml

  • Committer: Kunal Parmar
  • Date: 2014-10-24 19:21:09 UTC
  • Revision ID: pkunal.parmar@gmail.com-20141024192109-2ms4a91dnvn7idbm
Design feedback

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import QtQuick 2.0
2
2
import Ubuntu.Components 1.1
 
3
import Ubuntu.Components.ListItems 1.0
3
4
 
4
5
Item {
5
6
    id: root
8
9
    signal nextDayClicked();
9
10
    signal previousDayClicked();
10
11
 
11
 
    height: dateLayout.height
 
12
    height: units.gu(6)
12
13
 
13
14
    DayViewHeaderButton{
14
15
        anchors.left: parent.left
15
 
        anchors.leftMargin: parent.width / 6
16
 
        width: parent.width / 8
17
 
        height: parent.height
18
 
        text: "<"
 
16
        width: parent.width / 2.5
 
17
        iconName: "previous"
19
18
 
20
19
        onClicked: {
21
20
            root.previousDayClicked();
24
23
 
25
24
    DayViewHeaderButton{
26
25
        anchors.right: parent.right
27
 
        anchors.rightMargin: parent.width / 6
28
 
        width: parent.width / 8
29
 
        height: parent.height
30
 
        text: ">"
 
26
        width: parent.width / 2.5
 
27
        iconName: "next"
31
28
 
32
29
        onClicked: {
33
30
            root.nextDayClicked();
34
31
        }
35
32
    }
36
33
 
37
 
    Column {
38
 
        id: dateLayout
 
34
    Row {
39
35
        spacing: units.gu(1)
40
 
        anchors.horizontalCenter: parent.horizontalCenter
 
36
        anchors.centerIn: parent
41
37
 
42
38
        Label {
43
39
            objectName: "dayLabel"
44
 
            anchors.horizontalCenter: parent.horizontalCenter
 
40
            font.bold: true
45
41
            text: Qt.locale().standaloneDayName(date.getDay(), Locale.LongFormat)
46
42
        }
47
43
 
48
44
        Label{
49
45
            objectName: "dateLabel"
50
 
            color: UbuntuColors.orange
51
46
            text: date.getDate();
52
 
            anchors.horizontalCenter: parent.horizontalCenter
53
47
        }
54
48
    }
 
49
    Divider{ anchors.top: parent.bottom}
55
50
}