summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index cead612..7b29ce7 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -415,7 +415,10 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
}
}
QRect dr;
+ if ( w + x > parentWidget()->width() )
+ w = parentWidget()->width()-x;
paint->drawText ( x, yy, w, h, align, mDisplayedText, -1, &dr );
+ //qDebug("%d %d %d %d ", x, yy, w, h );
if ( mIncidence->cancelled() ){
if ( ! small ) {
QFontMetrics fm ( paint->font() );