summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-14 18:15:28 (UTC)
committer zautrix <zautrix>2005-06-14 18:15:28 (UTC)
commitd9df54411b01cabaf51fcae62b91f227f7eff5f5 (patch) (unidiff)
tree1b996ed8635d9cb7ecc03d735b46f03048fb4d95
parent05f27a0fe3d9d5455439f0efd683321d8c247482 (diff)
downloadkdepimpi-d9df54411b01cabaf51fcae62b91f227f7eff5f5.zip
kdepimpi-d9df54411b01cabaf51fcae62b91f227f7eff5f5.tar.gz
kdepimpi-d9df54411b01cabaf51fcae62b91f227f7eff5f5.tar.bz2
fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index c7bc6eb..1be0aca 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -345,65 +345,66 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
345 maxhei += AGENDA_ICON_SIZE -4; 345 maxhei += AGENDA_ICON_SIZE -4;
346 bool small = ( h < maxhei ); 346 bool small = ( h < maxhei );
347 if ( ! small ) 347 if ( ! small )
348 paint->setFont(KOPrefs::instance()->mAgendaViewFont); 348 paint->setFont(KOPrefs::instance()->mAgendaViewFont);
349 else { 349 else {
350 QFont f = KOPrefs::instance()->mAgendaViewFont; 350 QFont f = KOPrefs::instance()->mAgendaViewFont;
351 f.setBold( false ); 351 f.setBold( false );
352 int fh = f.pointSize(); 352 int fh = f.pointSize();
353 nfh = (((float)height())/(float)(mFontPixelSize+4))*fh; 353 nfh = (((float)height())/(float)(mFontPixelSize+4))*fh;
354 if ( nfh < 6 ) 354 if ( nfh < 6 )
355 nfh = 6; 355 nfh = 6;
356 f.setPointSize( nfh ); 356 f.setPointSize( nfh );
357 paint->setFont(f); 357 paint->setFont(f);
358 } 358 }
359 paint->fillRect ( x, yy, w, h, mBackgroundColor ); 359 paint->fillRect ( x, yy, w, h, mBackgroundColor );
360 static const QPixmap completedPxmp = SmallIcon("greenhook16"); 360 static const QPixmap completedPxmp = SmallIcon("greenhook16");
361 static const QPixmap overduePxmp = SmallIcon("redcross16"); 361 static const QPixmap overduePxmp = SmallIcon("redcross16");
362 if ( mIncidence->typeID() == todoID ) { 362 if ( mIncidence->typeID() == todoID ) {
363 Todo* tempTodo = static_cast<Todo*>(mIncidence); 363 Todo* tempTodo = static_cast<Todo*>(mIncidence);
364 int xx = pos().x()+(width()-completedPxmp.width()-3 ); 364 int xx = pos().x()+(width()-completedPxmp.width()-3 );
365 int yyy = yy+3; 365 int yyy = yy+3;
366 if ( tempTodo->isCompleted() ) 366 if ( tempTodo->isCompleted() )
367 paint->drawPixmap ( xx, yyy, completedPxmp ); 367 paint->drawPixmap ( xx, yyy, completedPxmp );
368 else { 368 else {
369 paint->drawPixmap ( xx, yyy, overduePxmp ); 369 paint->drawPixmap ( xx, yyy, overduePxmp );
370 370
371 } 371 }
372 } 372 }
373 bool addIcon = false; 373 bool addIcon = false;
374 if ( ! small || w > 3 * h || h > 3* w ) 374 if ( ! small || w > 3 * h || h > 3* w )
375 addIcon = updateIcons( paint, horLayout ); 375 addIcon = updateIcons( paint, horLayout );
376 376
377 qDrawShadePanel (paint, x, yy, w, h, mColorGroup, selected , 2, 0); 377 //qDrawShadePanel (paint, x, yy, w, h, mColorGroup, selected , 2, 0);
378 qDrawWinPanel (paint, x, yy, w, h, mColorGroup, selected ,0);
378 //qDebug("draw rect %d %d %d %d ",x, yy, w, h ); 379 //qDebug("draw rect %d %d %d %d ",x, yy, w, h );
379 if ( ! small ) { 380 if ( ! small ) {
380 x += 3; yy += 3;w -= 6; h-= 5; 381 x += 3; yy += 3;w -= 6; h-= 5;
381 } else { 382 } else {
382 x += 2; yy += 1;w -= 4; h-= 4; 383 x += 2; yy += 1;w -= 4; h-= 4;
383 if ( nfh < 6.01 ) { 384 if ( nfh < 6.01 ) {
384 yy -= 2; 385 yy -= 2;
385 h += 4; 386 h += 4;
386 } 387 }
387 else 388 else
388 if ( nfh < h -2 ) 389 if ( nfh < h -2 )
389 ++yy; 390 ++yy;
390 } 391 }
391 int align; 392 int align;
392#ifndef DESKTOP_VERSION 393#ifndef DESKTOP_VERSION
393 align = ( AlignLeft|WordBreak|AlignTop); 394 align = ( AlignLeft|WordBreak|AlignTop);
394#else 395#else
395 align = ( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 396 align = ( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
396#endif 397#endif
397 if ( addIcon ) { 398 if ( addIcon ) {
398 if ( ! horLayout ) { 399 if ( ! horLayout ) {
399 x += AGENDA_ICON_SIZE+3; 400 x += AGENDA_ICON_SIZE+3;
400 w -= (AGENDA_ICON_SIZE+3); 401 w -= (AGENDA_ICON_SIZE+3);
401 } 402 }
402 else { 403 else {
403 yy+= AGENDA_ICON_SIZE+2; 404 yy+= AGENDA_ICON_SIZE+2;
404 h -=(AGENDA_ICON_SIZE+3); 405 h -=(AGENDA_ICON_SIZE+3);
405 } 406 }
406 } 407 }
407 int colsum = mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue(); 408 int colsum = mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue();
408 if ( colsum < 250 ) 409 if ( colsum < 250 )
409 paint->setPen ( white); 410 paint->setPen ( white);