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

« back to all changes in this revision

Viewing changes to TimeLineHeaderComponent.qml

  • Committer: Kunal Parmar
  • Date: 2014-11-15 08:02:45 UTC
  • Revision ID: pkunal.parmar@gmail.com-20141115080245-9f093ak1owlh5tl8
new day and week view

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    signal dateSelected(var date);
34
34
 
35
35
    width: parent.width
 
36
    height: units.gu(4)
36
37
 
37
38
    Repeater{
38
 
        model: 7
 
39
        model: root.type == ViewType.ViewTypeWeek ? 7 : 1
39
40
 
40
41
        delegate: HeaderDateComponent{
41
42
            date: startDay.addDays(index);
51
52
                }
52
53
            }
53
54
 
54
 
            width: header.width/7
 
55
            width: root.type == ViewType.ViewTypeWeek ? ( header.width/7) : header.width
55
56
 
56
57
            onDateSelected: {
57
58
                header.dateSelected(date);
58
59
            }
 
60
 
 
61
            Loader{
 
62
                objectName: "divider"
 
63
                height: parent.height
 
64
                width: units.gu(0.15)
 
65
                sourceComponent: type == ViewType.ViewTypeWeek ? dividerComponent : undefined
 
66
            }
 
67
 
 
68
            Component {
 
69
                id: dividerComponent
 
70
                Rectangle{
 
71
                    anchors.fill: parent
 
72
                    color: "#e5e2e2"
 
73
                }
 
74
            }
59
75
        }
60
76
    }
61
77
}