author | zautrix <zautrix> | 2005-08-17 13:06:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-17 13:06:53 (UTC) |
commit | 4b66565ed2db51bc636b7b4c12f19f036d9b80f3 (patch) (side-by-side diff) | |
tree | 402372be9f52835e15757a51c18cfc46d47c8953 /korganizer/koagendaitem.cpp | |
parent | 31393a99cd2b190e62a7a09a7739a14af83936d1 (diff) | |
download | kdepimpi-4b66565ed2db51bc636b7b4c12f19f036d9b80f3.zip kdepimpi-4b66565ed2db51bc636b7b4c12f19f036d9b80f3.tar.gz kdepimpi-4b66565ed2db51bc636b7b4c12f19f036d9b80f3.tar.bz2 |
allday agenda item fix
-rw-r--r-- | korganizer/koagendaitem.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 49ad9b8..7a685d8 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -658,3 +658,21 @@ 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 diff = 0; + if ( mCellX < -3 && mAllDay ) { + diff = (mCellX + 3) * -grid; + //qDebug("%s: cellX %d diff %d wid %d grid %d ", mDisplayedText.latin1(), mCellX, diff, wid, grid); + if ( diff >= wid ) { + // qDebug("KOAgendaItem::resizeMe: diff >= wid: diff %d wid %d ", diff, wid); + //diff = 0; + } + } + if ( wid == width() || diff >= wid ) + resize( wid, hei ); + else + resize( wid - diff, hei ); + return diff; +} /* |