summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 5ee433a..7e6fa48 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -467,12 +467,13 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
467 int yy; 467 int yy;
468 if ( mAllDay ) 468 if ( mAllDay )
469 yy = y(); 469 yy = y();
470 else 470 else
471 yy = mCellYTop * ( height() / cellHeight() ); 471 yy = mCellYTop * ( height() / cellHeight() );
472 int xx = x(); 472 int xx = x();
473
473 if ( xPaintCoord != xx || yPaintCoord != yy || 474 if ( xPaintCoord != xx || yPaintCoord != yy ||
474 wPaintCoord != width() || hPaintCoord != height()) { 475 wPaintCoord != width() || hPaintCoord != height()) {
475 xPaintCoord= xx; 476 xPaintCoord= xx;
476 yPaintCoord = yy; 477 yPaintCoord = yy;
477 wPaintCoord = width(); 478 wPaintCoord = width();
478 hPaintCoord = height(); 479 hPaintCoord = height();
@@ -494,13 +495,32 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
494 } else { 495 } else {
495 if ( mAllDay ) 496 if ( mAllDay )
496 paintFrom = paintPixAllday(); 497 paintFrom = paintPixAllday();
497 else 498 else
498 paintFrom = paintPix(); 499 paintFrom = paintPix();
499 } 500 }
500 bitBlt (this, rx, ry, paintFrom, x()+rx ,yPaintCoord+ry, rw, rh ,CopyROP); 501 xx += rx;
502
503 if ( xx < 0 ) {
504 rw = rw + xx;
505 rx -= xx;
506 xx = 0;
507 if ( rw < 0 ) {
508 qDebug("KOAgendaItem::Width1 < 0. Returning ");
509 return;
510 }
511 }
512 if ( paintFrom->width() < xx+rw ) {
513 rw = paintFrom->width() - xx;
514 if ( rw < 0 ) {
515 qDebug("KOAgendaItem::Width2 < 0. Returning ");
516 return;
517 }
518 }
519 //qDebug("%d %d %d %d %d %d %d",rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh);
520 bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,CopyROP);
501} 521}
502void KOAgendaItem::computeText() 522void KOAgendaItem::computeText()
503{ 523{
504 524
505 mDisplayedText = mIncidence->summary(); 525 mDisplayedText = mIncidence->summary();
506 if ( (mIncidence->type() == "Todo") ) { 526 if ( (mIncidence->type() == "Todo") ) {