~mihirsoni/ubuntu-calendar-app/dateSelectNewEventTest

« back to all changes in this revision

Viewing changes to EventBubble.qml

  • Committer: Kunal Parmar
  • Date: 2014-10-21 15:16:26 UTC
  • mfrom: (515 trunk)
  • mto: This revision was merged to the branch mainline in revision 520.
  • Revision ID: pkunal.parmar@gmail.com-20141021151626-7rzd6ikqezu9s2fz
mergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
 
105
105
            id: detailsItems
106
106
            property alias timeLabelHeight : timeLabel.height
107
 
            property alias timeLableText: timeLabel.text
108
 
            property alias titleLabelText: titleLabel.text
109
 
            property alias descriptionText: descriptionLabel.text
110
107
 
111
108
            width: parent.width
112
109
            height: detailsColumn.height
179
176
                var endTime = event.endDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
180
177
 
181
178
                if (type === wideType) {
182
 
                    timeLableText= ""
183
 
                    titleLabelText = ""
184
 
                    descriptionText.text = ""
 
179
                    timeLabel.text = ""
 
180
                    titleLabel.text = ""
 
181
                    descriptionLabel.text = ""
185
182
                    //height is less then set only event title
186
183
                    if( infoBubble.height > minimumHeight ) {
187
184
                        //on wide type show all details
189
186
                            // TRANSLATORS: the first argument (%1) refers to a start time for an event,
190
187
                            // while the second one (%2) refers to the end time
191
188
                            var timeString = i18n.tr("%1 - %2").arg(startTime).arg(endTime)
192
 
                            timeLableText = timeString
193
 
                            titleLabelText = event.displayLabel
 
189
                            timeLabel.text = timeString
 
190
                            titleLabel.text = event.displayLabel
194
191
                        } else if ( event.displayLabel ) {
195
192
                            // TRANSLATORS: the first argument (%1) refers to a start time for an event,
196
193
                            // while the second one (%2) refers to title of event
197
 
                            timeLableText = i18n.tr("%1 - %2").arg(startTime).arg(event.displayLabel);
 
194
                            timeLabel.text = i18n.tr("%1 - %2").arg(startTime).arg(event.displayLabel);
198
195
                        }
199
196
 
200
197
                        if (event.description) {
201
 
                            descriptionText = event.description
 
198
                            descriptionLabel.text = event.description
202
199
                            //descriptionText = event.description
203
200
                            //If content is too much don't display.
204
201
                            if (infoBubble.height < descriptionLabel.y + descriptionLabel.height + units.gu(1)) {
205
 
                                descriptionText = ""
 
202
                                descriptionLabel.text = ""
206
203
                            }
207
204
                        }
208
205