summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
authorzautrix <zautrix>2005-02-19 16:54:24 (UTC)
committer zautrix <zautrix>2005-02-19 16:54:24 (UTC)
commit11b5b0eb24cfb943df106f7ee97646955bec0fd3 (patch) (side-by-side diff)
treeca62b4515977e0538fff0b1ee15a25bd8aed808e /korganizer/koagendaitem.cpp
parente15d171a0630656b6e4a66d6cab6a7d64a37434b (diff)
downloadkdepimpi-11b5b0eb24cfb943df106f7ee97646955bec0fd3.zip
kdepimpi-11b5b0eb24cfb943df106f7ee97646955bec0fd3.tar.gz
kdepimpi-11b5b0eb24cfb943df106f7ee97646955bec0fd3.tar.bz2
fixiiii
Diffstat (limited to 'korganizer/koagendaitem.cpp') (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
@@ -394,49 +394,52 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
w -= (AGENDA_ICON_SIZE+3);
}
else {
yy+= AGENDA_ICON_SIZE+2;
h -=(AGENDA_ICON_SIZE+3);
}
}
int colsum = mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue();
if ( colsum < 250 )
paint->setPen ( white);
if ( x < 0 ) {
w = w+x-3;
x = 3;
if ( w > parentWidget()->width() ){
w = parentWidget()->width() - 6;
#ifndef DESKTOP_VERSION
align = ( AlignCenter|WordBreak);
#else
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);
}
}
pa.end();
}
void KOAgendaItem::resizePixmap( int w , int h )
{
paintPix()->resize( w, h );
paintPixSel()->resize( w, h );
}
QPixmap * KOAgendaItem::paintPix()
{
static QPixmap* mPaintPix = 0;
if ( ! mPaintPix )
mPaintPix = new QPixmap(1,1);
return mPaintPix ;
}
QPixmap * KOAgendaItem::paintPixAllday()