~timo-jyrinki/ubuntu-calendar-app/use_pickerpanelworkaround_lp1351024

« back to all changes in this revision

Viewing changes to EventBubble.qml

  • Committer: Kunal Parmar
  • Date: 2014-05-19 08:54:41 UTC
  • mfrom: (274 ubuntu-calendar-app)
  • mto: This revision was merged to the branch mainline in revision 354.
  • Revision ID: pkunal.parmar@gmail.com-20140519085441-rw80fn7schao4tqi
mergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        }
38
38
 
39
39
        // TRANSLATORS: this is a time formatting string,
40
 
        // see http://qt-project.org/doc/qt-5.0/qtqml/qml-qtquick2-date.html#details for valid expressions
 
40
        // see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions
41
41
        var timeFormat = i18n.tr("hh:mm");
42
42
        var startTime = event.startDateTime.toLocaleTimeString(Qt.locale(), timeFormat)
43
43
        var endTime = event.endDateTime.toLocaleTimeString(Qt.locale(), timeFormat)
57
57
 
58
58
                if( event.displayLabel)
59
59
                    titleLabel.text = event.displayLabel;
60
 
 
61
60
                if( event.description)
 
61
                {
62
62
                    descriptionLabel.text = event.description
 
63
                    //If content is too much don't display.
 
64
                    if( height < descriptionLabel.height + descriptionLabel.y){
 
65
                        descriptionLabel.text = ""
 
66
                    }
 
67
                }
63
68
            } else {
64
69
                //narrow type shows only time and title
65
70
                timeLabel.text = startTime
109
114
 
110
115
    Column{
111
116
        id: detailsColumn
112
 
        width: parent.width
 
117
 
 
118
        anchors.fill: parent
 
119
        anchors.topMargin: units.gu(1)
 
120
        anchors.leftMargin: units.gu(1)
 
121
        anchors.rightMargin: units.gu(1)
113
122
 
114
123
        Row{
115
124
            width: parent.width
 
125
 
 
126
            Label{
 
127
                id: timeLabel
 
128
                fontSize:"small";
 
129
                color:"gray"
 
130
                width: parent.width - calendarIndicator.width
 
131
            }
116
132
            Rectangle{
117
133
                id: calendarIndicator
118
134
                width: units.gu(1)
119
135
                radius: width/2
120
136
                height: width
121
137
                color: "#715772"
122
 
                anchors.verticalCenter: parent.verticalCenter
123
 
                antialiasing: true
124
 
            }
125
 
 
126
 
            Label{
127
 
                id: timeLabel
128
 
                fontSize:"small";
129
 
                color:"gray"
130
 
                width: parent.width
131
138
            }
132
139
        }
133
 
 
134
140
        Label{
135
141
            id: titleLabel
136
 
            x: units.gu(1)
137
142
            fontSize:"small";
138
143
            color:"black"
139
144
            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
142
147
 
143
148
        Label{
144
149
            id: descriptionLabel
145
 
            x: units.gu(1)
146
150
            fontSize:"small";
147
151
            color:"gray"
148
152
            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
151
155
        }
152
156
    }
153
157
 
 
158
 
154
159
    MouseArea{
155
160
        anchors.fill: parent
156
161
        onClicked: {