-rw-r--r-- | korganizer/koagendaitem.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 7a685d8..81681df 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -582,7 +582,8 @@ void KOAgendaItem::computeText() | |||
582 | if ( mIncidence->doesRecur() ) { | 582 | if ( mIncidence->doesRecur() ) { |
583 | mDisplayedText += " (" + mIncidence->recurrence()->recurrenceText() + ")"; | 583 | mDisplayedText += " (" + mIncidence->recurrence()->recurrenceText() + ")"; |
584 | } else { | 584 | } else { |
585 | mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) ; | 585 | int dur = 1+ (static_cast<Event*>(mIncidence))->dtStart().date().daysTo( (static_cast<Event*>(mIncidence))->dtEnd().date() ); |
586 | mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) + " ("+QString::number( dur )+i18n(" days") +")" ; | ||
586 | } | 587 | } |
587 | } | 588 | } |
588 | } | 589 | } |
@@ -658,7 +659,7 @@ int KOAgendaItem::cellHeight() | |||
658 | } | 659 | } |
659 | // it may be that allday agenda items have a needed width > 32000 | 660 | // it may be that allday agenda items have a needed width > 32000 |
660 | // this code is to fix this problem | 661 | // this code is to fix this problem |
661 | int KOAgendaItem::resizeMe( int grid, int wid, int hei ) | 662 | int KOAgendaItem::resizeMe( int grid, int wid, int hei, bool invalidWidth ) |
662 | { | 663 | { |
663 | int diff = 0; | 664 | int diff = 0; |
664 | if ( mCellX < -3 && mAllDay ) { | 665 | if ( mCellX < -3 && mAllDay ) { |
@@ -669,10 +670,11 @@ int KOAgendaItem::resizeMe( int grid, int wid, int hei ) | |||
669 | //diff = 0; | 670 | //diff = 0; |
670 | } | 671 | } |
671 | } | 672 | } |
672 | if ( wid == width() || diff >= wid ) | 673 | if ( (!invalidWidth && wid == width() ) || diff >= wid ) |
673 | resize( wid, hei ); | 674 | resize( wid, hei ); |
674 | else | 675 | else |
675 | resize( wid - diff, hei ); | 676 | resize( wid - diff, hei ); |
677 | //qDebug("wid %d x %d ", width(), x()); | ||
676 | return diff; | 678 | return diff; |
677 | } | 679 | } |
678 | /* | 680 | /* |