summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-06-15 16:07:02 (UTC)
committer zautrix <zautrix>2005-06-15 16:07:02 (UTC)
commit2a788f41ebeb7d8edab7010fb1a00799cb9e036d (patch) (unidiff)
tree0d8f635abc48d64add3131f8b5891ee70a877802 /korganizer
parent40fa3e374fd96c0cb8925a1c3c46d40e1ea2b111 (diff)
downloadkdepimpi-2a788f41ebeb7d8edab7010fb1a00799cb9e036d.zip
kdepimpi-2a788f41ebeb7d8edab7010fb1a00799cb9e036d.tar.gz
kdepimpi-2a788f41ebeb7d8edab7010fb1a00799cb9e036d.tar.bz2
fixxx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp27
1 files changed, 21 insertions, 6 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 2150654..475bb4a 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -318,18 +318,25 @@ void MonthViewItem::paint(QPainter *p)
318 318
319 319
320 int heihei = height( listBox () );
321 int x = 1;
320 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) 322 if (KOPrefs::instance()->mMonthViewUsesCategoryColor)
321 { 323 {
322 p->setBackgroundColor( palette().color( QPalette::Normal, \ 324 p->setBackgroundColor( palette().color( QPalette::Normal, \
323 sel ? QColorGroup::Highlight : QColorGroup::Background ) ); 325 sel ? QColorGroup::Highlight : QColorGroup::Background ) );
324 p->eraseRect( 0, 0, listBox()->maxItemWidth(), height( listBox() ) ); 326 p->eraseRect( 0, 0, listBox()->maxItemWidth(), heihei );
325 } 327 }
326 int x = 1; 328
327 //int y = 3;//(height() - mRecurPixmap.height()) /2; 329 //int y = 3;//(height() - mRecurPixmap.height()) /2;
328 int size = PIXMAP_SIZE; 330 int size = PIXMAP_SIZE;
329 if ( QApplication::desktop()->width() < 300 ) 331 if ( QApplication::desktop()->width() < 300 )
330 size = 3; 332 size = 3;
331 int heihei = height( listBox () );
332 int y = (heihei - size -1 ) /2; 333 int y = (heihei - size -1 ) /2;
333 334
335 if ( mIncidence->calID() > 1 ) {
336 p->fillRect ( x, y-2,size,size+4, KOPrefs::instance()->defaultColor( mIncidence->calID() ) );
337 p->drawRect ( x, y-2,size,size+4);
338 x += size + 1;
339 }
340
334 if ( KOPrefs::instance()->mMonthShowIcons ) { 341 if ( KOPrefs::instance()->mMonthShowIcons ) {
335 if ( mInfo ) { 342 if ( mInfo ) {
@@ -611,4 +618,5 @@ void MonthViewCell::startUpdateCell()
611 mAvailItemList.clear(); 618 mAvailItemList.clear();
612 mAvailItemList.setAutoDelete( false ); 619 mAvailItemList.setAutoDelete( false );
620 clear();
613 } 621 }
614 622
@@ -764,4 +772,5 @@ int MonthViewCell::insertEvent(Event *event)
764 item->setReply(false); 772 item->setReply(false);
765#endif 773#endif
774
766 item->setMultiDay( multiday ); 775 item->setMultiDay( multiday );
767 if ( multiday ) { 776 if ( multiday ) {
@@ -769,7 +778,13 @@ int MonthViewCell::insertEvent(Event *event)
769 ++mdayCount; 778 ++mdayCount;
770 } else { 779 } else {
771 uint i; 780 uint i = mdayCount;
772 int pos = mdayCount; 781 uint pos = mdayCount;
773 for ( i = mdayCount; i < count();++i ) { 782 uint itcount = count();
783 if ( itcount > 1000 ) {
784 qDebug("KO: Bug in MonthViewCell::insertEvent %u ", itcount);
785 itcount = 0;
786 }
787 for ( i = pos; i < itcount;++i ) {
788 // qDebug("i %d mday %u count %d ",i,itcount,mdayCount );
774 QListBoxItem* it = this->item ( i ); 789 QListBoxItem* it = this->item ( i );
775 if ( it && text < it->text() ) { 790 if ( it && text < it->text() ) {