summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index b30ad75..23afe7a 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -400,48 +400,52 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
400 } 400 }
401 } 401 }
402 int colsum = mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue(); 402 int colsum = mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue();
403 if ( colsum < 250 ) 403 if ( colsum < 250 )
404 paint->setPen ( white); 404 paint->setPen ( white);
405 if ( x < 0 ) { 405 if ( x < 0 ) {
406 w = w+x-3; 406 w = w+x-3;
407 x = 3; 407 x = 3;
408 if ( w > parentWidget()->width() ){ 408 if ( w > parentWidget()->width() ){
409 w = parentWidget()->width() - 6; 409 w = parentWidget()->width() - 6;
410#ifndef DESKTOP_VERSION 410#ifndef DESKTOP_VERSION
411 align = ( AlignHCenter|WordBreak|AlignTop); 411 align = ( AlignHCenter|WordBreak|AlignTop);
412#else 412#else
413 align = ( AlignHCenter|BreakAnywhere|WordBreak|AlignTop); 413 align = ( AlignHCenter|BreakAnywhere|WordBreak|AlignTop);
414#endif 414#endif
415 415
416 } 416 }
417 } 417 }
418 QRect dr; 418 QRect dr;
419 if ( w + x > parentWidget()->width() ) 419 if ( w + x > parentWidget()->width() )
420 w = parentWidget()->width()-x; 420 w = parentWidget()->width()-x;
421 paint->drawText ( x, yy, w, h, align, mDisplayedText, -1, &dr ); 421 paint->drawText ( x, yy, w, h, align, mDisplayedText, -1, &dr );
422 //qDebug("%d %d %d %d ", x, yy, w, h ); 422 //qDebug("%d %d %d %d ", x, yy, w, h );
423 if ( mIncidence->cancelled() ){ 423 if ( mIncidence->cancelled() ){
424
425
426 small = ( height() < 20 );
427
424 if ( ! small ) { 428 if ( ! small ) {
425 QFontMetrics fm ( paint->font() ); 429 QFontMetrics fm ( paint->font() );
426 paint->drawLine(dr.left(), yy+fm.height()/2, dr.right()-2, yy+fm.height()/2); 430 paint->drawLine(dr.left(), yy+fm.height()/2, dr.right()-2, yy+fm.height()/2);
427 } 431 }
428 432
429 } 433 }
430 pa.end(); 434 pa.end();
431 435
432} 436}
433void KOAgendaItem::resizePixmap( int w , int h ) 437void KOAgendaItem::resizePixmap( int w , int h )
434{ 438{
435 paintPix()->resize( w, h ); 439 paintPix()->resize( w, h );
436 paintPixSel()->resize( w, h ); 440 paintPixSel()->resize( w, h );
437 441
438} 442}
439QPixmap * KOAgendaItem::paintPix() 443QPixmap * KOAgendaItem::paintPix()
440{ 444{
441 static QPixmap* mPaintPix = 0; 445 static QPixmap* mPaintPix = 0;
442 if ( ! mPaintPix ) 446 if ( ! mPaintPix )
443 mPaintPix = new QPixmap(1,1); 447 mPaintPix = new QPixmap(1,1);
444 return mPaintPix ; 448 return mPaintPix ;
445} 449}
446QPixmap * KOAgendaItem::paintPixAllday() 450QPixmap * KOAgendaItem::paintPixAllday()
447{ 451{