-rw-r--r-- | korganizer/komonthview.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 96f2502..2150654 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -721,32 +721,34 @@ int MonthViewCell::insertEvent(Event *event) item->recycle( event, mDate, text ); } else { item = new MonthViewItem( event, mDate, text ); } QPalette pal; if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { QStringList categories = event->categories(); QString cat = categories.first(); if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { pal = getPalette(); if (cat.isEmpty()) { - pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); + //pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); + pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->defaultColor( event->calID() )); } else { pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); } } else { if (cat.isEmpty()) { - pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); + //pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); + pal = QPalette( KOPrefs::instance()->defaultColor( event->calID() ), KOPrefs::instance()->defaultColor( event->calID() )); } else { pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); } } } else { pal = mStandardPalette ; } item->setPalette( pal ); item->setRecur( event->recurrence()->doesRecur() ); item->setAlarm( event->isAlarmEnabled() && multiday < 2 && event->alarmEnabled() ); item->setMoreInfo( event->description().length() > 0 ); @@ -802,32 +804,34 @@ void MonthViewCell::insertTodo(Todo *todo) } else { item = new MonthViewItem( todo, mDate, text ); } //MonthViewItem *item = new MonthViewItem( todo, mDate, text ); //item->setPalette( mStandardPalette ); QPalette pal; if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { QStringList categories = todo->categories(); QString cat = categories.first(); if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { pal = getPalette(); if (cat.isEmpty()) { - pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); + //pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); + pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->defaultColor( todo->calID() )); } else { pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); } } else { if (cat.isEmpty()) { - pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); + //pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); + pal = QPalette(KOPrefs::instance()->defaultColor( todo->calID() ), KOPrefs::instance()->defaultColor( todo->calID() )); } else { pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); } } } else { pal = mStandardPalette ; } item->setPalette( pal ); item->setRecur( todo->recurrence()->doesRecur() ); item->setAlarm( todo->isAlarmEnabled() && todo->alarmEnabled() ); item->setMoreInfo( todo->description().length() > 0 ); |