author | zautrix <zautrix> | 2005-08-22 16:28:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-22 16:28:08 (UTC) |
commit | 18780cc2342097b343ee2fa50c649f425ddaed34 (patch) (side-by-side diff) | |
tree | 6ea015c45835e96451cede982ac79a518141dd29 /korganizer/koagendaitem.cpp | |
parent | 4a5e2a487ee162c1e3d5ea0d1c8d4bd14a65efb9 (diff) | |
download | kdepimpi-18780cc2342097b343ee2fa50c649f425ddaed34.zip kdepimpi-18780cc2342097b343ee2fa50c649f425ddaed34.tar.gz kdepimpi-18780cc2342097b343ee2fa50c649f425ddaed34.tar.bz2 |
fix for the lonng agenda float fix
-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 @@ -583,5 +583,6 @@ void KOAgendaItem::computeText() mDisplayedText += " (" + mIncidence->recurrence()->recurrenceText() + ")"; } else { - mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) ; + int dur = 1+ (static_cast<Event*>(mIncidence))->dtStart().date().daysTo( (static_cast<Event*>(mIncidence))->dtEnd().date() ); + 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") +")" ; } } @@ -659,5 +660,5 @@ int KOAgendaItem::cellHeight() // it may be that allday agenda items have a needed width > 32000 // this code is to fix this problem -int KOAgendaItem::resizeMe( int grid, int wid, int hei ) +int KOAgendaItem::resizeMe( int grid, int wid, int hei, bool invalidWidth ) { int diff = 0; @@ -670,8 +671,9 @@ int KOAgendaItem::resizeMe( int grid, int wid, int hei ) } } - if ( wid == width() || diff >= wid ) + if ( (!invalidWidth && wid == width() ) || diff >= wid ) resize( wid, hei ); else resize( wid - diff, hei ); + //qDebug("wid %d x %d ", width(), x()); return diff; } |