67
Component.onCompleted: {
71
function setDetails() {
72
if(event === null || event === undefined) {
76
var startTime = event.startDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
77
var endTime = event.endDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
79
// TRANSLATORS: the first argument (%1) refers to a start time for an event,
80
// while the second one (%2) refers to the end time
81
var timeString = i18n.tr("%1 - %2").arg(startTime).arg(endTime)
83
if (type === wideType) {
84
eventDetails.item.timeLableText= ""
85
eventDetails.item.titleLabelText = ""
86
eventDetails.item.descriptionText.text = ""
87
//height is less then set only event title
88
if( height > minimumHeight ) {
89
//on wide type show all details
90
eventDetails.item.timeLableText = timeString
91
if (event.displayLabel)
92
eventDetails.item.titleLabelText = event.displayLabel;
93
if (event.description)
95
eventDetails.item.descriptionText= event.description
96
//If content is too much don't display.
97
if (height < descriptionLabel.height + descriptionLabel.y) {
98
eventDetails.item.descriptionText.text = ""
101
layoutBubbleDetails();
104
if (event.displayLabel)
105
eventDetails.item.timeLableText = event.displayLabel;
64
if (model && event ) {
109
65
var collection = model.collection( event.collectionId );
110
66
bg.color = collection.color
199
153
flickable.onContentYChanged.connect(layoutBubbleDetails);
162
function setDetails() {
163
if(event === null || event === undefined) {
167
var startTime = event.startDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
168
var endTime = event.endDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
170
if (type === wideType) {
173
descriptionText.text = ""
174
//height is less then set only event title
175
if( infoBubble.height > minimumHeight ) {
176
//on wide type show all details
177
if( infoBubble.height > titleLabel.y + titleLabel.height + units.gu(1)) {
178
// TRANSLATORS: the first argument (%1) refers to a start time for an event,
179
// while the second one (%2) refers to the end time
180
var timeString = i18n.tr("%1 - %2").arg(startTime).arg(endTime)
181
timeLableText = timeString
182
titleLabelText = event.displayLabel
183
} else if ( event.displayLabel ) {
184
// TRANSLATORS: the first argument (%1) refers to a start time for an event,
185
// while the second one (%2) refers to title of event
186
timeLableText = i18n.tr("%1 - %2").arg(startTime).arg(event.displayLabel);
189
if (event.description) {
190
descriptionText = event.description
191
//descriptionText = event.description
192
//If content is too much don't display.
193
if (infoBubble.height < descriptionLabel.y + descriptionLabel.height + units.gu(1)) {
198
layoutBubbleDetails();
199
} else if (event.displayLabel){
200
eventDetails.item.timeLableText = event.displayLabel;