summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
authorzautrix <zautrix>2005-08-17 13:06:53 (UTC)
committer zautrix <zautrix>2005-08-17 13:06:53 (UTC)
commit4b66565ed2db51bc636b7b4c12f19f036d9b80f3 (patch) (unidiff)
tree402372be9f52835e15757a51c18cfc46d47c8953 /korganizer/koagendaitem.cpp
parent31393a99cd2b190e62a7a09a7739a14af83936d1 (diff)
downloadkdepimpi-4b66565ed2db51bc636b7b4c12f19f036d9b80f3.zip
kdepimpi-4b66565ed2db51bc636b7b4c12f19f036d9b80f3.tar.gz
kdepimpi-4b66565ed2db51bc636b7b4c12f19f036d9b80f3.tar.bz2
allday agenda item fix
Diffstat (limited to 'korganizer/koagendaitem.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp20
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
@@ -656,7 +656,25 @@ int KOAgendaItem::cellHeight()
656 } 656 }
657 return ret; 657 return ret;
658} 658}
659 659// it may be that allday agenda items have a needed width > 32000
660// this code is to fix this problem
661int KOAgendaItem::resizeMe( int grid, int wid, int hei )
662{
663 int diff = 0;
664 if ( mCellX < -3 && mAllDay ) {
665 diff = (mCellX + 3) * -grid;
666 //qDebug("%s: cellX %d diff %d wid %d grid %d ", mDisplayedText.latin1(), mCellX, diff, wid, grid);
667 if ( diff >= wid ) {
668 // qDebug("KOAgendaItem::resizeMe: diff >= wid: diff %d wid %d ", diff, wid);
669 //diff = 0;
670 }
671 }
672 if ( wid == width() || diff >= wid )
673 resize( wid, hei );
674 else
675 resize( wid - diff, hei );
676 return diff;
677}
660/* 678/*
661 Return height of item in units of agenda cells 679 Return height of item in units of agenda cells
662*/ 680*/