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) (side-by-side diff)
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) (ignore 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()
}
return ret;
}
-
+// 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;
+}
/*
Return height of item in units of agenda cells
*/