summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index e660c32..a8e0678 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -131,9 +131,14 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
}
}
- mColorGroup = QColorGroup( mBackgroundColor.light(),
- mBackgroundColor.dark(),mBackgroundColor.light(),
- mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ;
+
+ QColor BackgroundColor ( mBackgroundColor );
+ if ( mIncidence->calID() > 1 ) {
+ BackgroundColor = KOPrefs::instance()->defaultColor( mIncidence->calID() );
+ }
+ mColorGroup = QColorGroup( BackgroundColor.light(),
+ BackgroundColor.dark(),BackgroundColor.light(),
+ BackgroundColor.dark(),BackgroundColor, black, BackgroundColor) ;
setBackgroundColor( mBackgroundColor );
mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250);
mConflictItems.clear();