-rw-r--r-- | korganizer/koagendaitem.cpp | 3 |
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 @@ -412,13 +412,16 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) align = ( AlignCenter|BreakAnywhere|WordBreak); #endif } } 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() ); paint->drawLine(dr.left(), yy+fm.height()/2, dr.right()-2, yy+fm.height()/2); } |