summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-27 21:06:01 (UTC)
committer zautrix <zautrix>2005-06-27 21:06:01 (UTC)
commit386f48c2011e49c7c145bad7754a725cabc25dd5 (patch) (unidiff)
tree104009f871e81468f2b4b5ba779b12c25a409c32
parentbf664c505e66f54dd03c3518386fdeab43108e56 (diff)
downloadkdepimpi-386f48c2011e49c7c145bad7754a725cabc25dd5.zip
kdepimpi-386f48c2011e49c7c145bad7754a725cabc25dd5.tar.gz
kdepimpi-386f48c2011e49c7c145bad7754a725cabc25dd5.tar.bz2
mont fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index aeb3974..64b0e95 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -306,68 +306,67 @@ bool MonthViewItem::setHighlightedFalse()
306 return true; 306 return true;
307} 307}
308 308
309bool MonthViewItem::setHighlighted( Incidence * inc ) 309bool MonthViewItem::setHighlighted( Incidence * inc )
310{ 310{
311 if ( inc == mIncidence ) { 311 if ( inc == mIncidence ) {
312 if ( mDisplayHightlighted ) 312 if ( mDisplayHightlighted )
313 return false; 313 return false;
314 mDisplayHightlighted = true; 314 mDisplayHightlighted = true;
315 return true; 315 return true;
316 } else { 316 } else {
317 if ( !mDisplayHightlighted ) 317 if ( !mDisplayHightlighted )
318 return false; 318 return false;
319 mDisplayHightlighted = false; 319 mDisplayHightlighted = false;
320 return true; 320 return true;
321 } 321 }
322 return false; 322 return false;
323} 323}
324void MonthViewItem::paint(QPainter *p) 324void MonthViewItem::paint(QPainter *p)
325{ 325{
326 if ( mblockRepaint || !mIncidence ) { 326 if ( mblockRepaint || !mIncidence ) {
327 return; 327 return;
328 } 328 }
329#if QT_VERSION >= 0x030000 329#if QT_VERSION >= 0x030000
330 bool sel = isSelected(); 330 bool sel = isSelected();
331#else 331#else
332 bool sel = selected(); 332 bool sel = selected();
333#endif 333#endif
334 int heihei = height( listBox () ); 334 int heihei = height( listBox () );
335 int x = 1; 335 int x = 1;
336 if (KOPrefs::instance()->mMonthViewUsesCategoryColor || mDisplayHightlighted || sel ) 336 if (KOPrefs::instance()->mMonthViewUsesCategoryColor || mDisplayHightlighted || sel )
337 { 337 {
338 if ( mDisplayHightlighted ) 338
339 sel = true;
340 p->setBackgroundColor( palette().color( QPalette::Normal, \ 339 p->setBackgroundColor( palette().color( QPalette::Normal, \
341 sel ? QColorGroup::Highlight : QColorGroup::Background ) ); 340 sel ||mDisplayHightlighted ? QColorGroup::Highlight : QColorGroup::Background ) );
342 p->eraseRect( 0, 0, listBox()->maxItemWidth(), heihei ); 341 p->eraseRect( 0, 0, listBox()->maxItemWidth(), heihei );
343 } 342 }
344 343
345 //int y = 3;//(height() - mRecurPixmap.height()) /2; 344 //int y = 3;//(height() - mRecurPixmap.height()) /2;
346 int size = PIXMAP_SIZE; 345 int size = PIXMAP_SIZE;
347 if ( QApplication::desktop()->width() < 300 ) 346 if ( QApplication::desktop()->width() < 300 )
348 size = 3; 347 size = 3;
349 int y = (heihei - size -1 ) /2; 348 int y = (heihei - size -1 ) /2;
350 349
351 if ( mIncidence->calID() > 1 ) { 350 if ( mIncidence->calID() > 1 ) {
352 p->fillRect ( x, y-2,size,size+4, KOPrefs::instance()->defaultColor( mIncidence->calID() ) ); 351 p->fillRect ( x, y-2,size,size+4, KOPrefs::instance()->defaultColor( mIncidence->calID() ) );
353 p->drawRect ( x, y-2,size,size+4); 352 p->drawRect ( x, y-2,size,size+4);
354 x += size + 1; 353 x += size + 1;
355 } 354 }
356 if ( KOPrefs::instance()->mMonthShowIcons ) { 355 if ( KOPrefs::instance()->mMonthShowIcons ) {
357 if ( mInfo ) { 356 if ( mInfo ) {
358 p->fillRect ( x, y,size,size, Qt::darkGreen ); 357 p->fillRect ( x, y,size,size, Qt::darkGreen );
359 x += size + 1; 358 x += size + 1;
360 } 359 }
361 if ( mRecur ) { 360 if ( mRecur ) {
362 p->fillRect ( x, y,size,size, Qt::blue ); 361 p->fillRect ( x, y,size,size, Qt::blue );
363 x += size + 1; 362 x += size + 1;
364 } 363 }
365 if ( mAlarm ) { 364 if ( mAlarm ) {
366 p->fillRect ( x, y,size,size, Qt::red ); 365 p->fillRect ( x, y,size,size, Qt::red );
367 x += size + 1; 366 x += size + 1;
368 } 367 }
369 if ( mReply ) { 368 if ( mReply ) {
370 p->fillRect ( x, y,size,size, Qt::yellow ); 369 p->fillRect ( x, y,size,size, Qt::yellow );
371 x += size + 1; 370 x += size + 1;
372 } 371 }
373 } 372 }