summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
Side-by-side diff
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
@@ -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;
+}
/*