-rw-r--r-- | core/pim/datebook/datebookday.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index 325b902..aaf3e16 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp @@ -592,57 +592,60 @@ DateBookDayWidget::DateBookDayWidget( const EffectiveEvent &e, QString strNote = ev.notes(); where = strNote.find( "<" ); while ( where != -1 ) { strNote.remove( where, 1 ); strNote.insert( where, "<" ); where = strNote.find( "<", where ); } - text = "<b>" + strDesc + "</b><br>" + "<i>" - + strCat + "</i><br>"; + text = "<b>" + strDesc + "</b><br>" + "<i>"; + if ( !strCat.isEmpty() ) { + text += strCat + "</i><br>"; + } if (ev.event().type() == Event::Normal ) setEventText( text ); else setAllDayText( text ); text += "<br><br>" + strNote; setBackgroundMode( PaletteBase ); QTime start = ev.start(); QTime end = ev.end(); int y = start.hour()*60+start.minute(); int h = end.hour()*60+end.minute()-y; int rh = dateBook->dayView()->rowHeight(0); y = y*rh/60; h = h*rh/60; - if ( h < 3 ) + if ( h < 3 ) { h = 3; + } geom.setY( y ); geom.setHeight( h ); geom.setX( 0 ); geom.setWidth(dateBook->dayView()->columnWidth(0)-1); } void DateBookDayWidget::setAllDayText( QString &text ) { text += "<b>" + tr("This is an all day event.") + "</b><br>"; } void DateBookDayWidget::setEventText( QString& text ) { bool whichClock = dateBook->dayView()->whichClock(); - text += "<b>" + tr("Start") + "</b>: "; + text += "<b>" + tr("Time") + "</b>: "; if ( ev.startDate() != ev.date() ) { // multi-day event. Show start date text += TimeString::longDateString( ev.startDate() ); } else { // Show start time. text += TimeString::timeString( ev.start(), whichClock, FALSE ); } - text += "<br><b>" + tr("End") + "</b>: "; + text += "<b>" + tr(" - ") + "</b>"; if ( ev.endDate() != ev.date() ) { // multi-day event. Show end date text += TimeString::longDateString( ev.endDate() ); } else { // Show end time. text += TimeString::timeString( ev.end(), whichClock, FALSE ); } |