-rw-r--r-- | korganizer/koagendaitem.cpp | 11 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 2 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 12 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 1 |
5 files changed, 18 insertions, 9 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index e660c32..a8e0678 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -133,5 +133,10 @@ 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 ); diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 52bc463..a653c18 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -346,2 +346,3 @@ void KOCalEditView::readConfig() cb->setEnabled( false ); + if ( row > 1) { KColorButton *colb = new KColorButton( mw ); @@ -351,3 +352,2 @@ void KOCalEditView::readConfig() connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) ); - if ( row > 1) { KOCalButton* calb = new KOCalButton( mw ); diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 96f2502..2150654 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -732,3 +732,4 @@ int MonthViewCell::insertEvent(Event *event) 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 { @@ -739,3 +740,4 @@ int MonthViewCell::insertEvent(Event *event) 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 { @@ -813,3 +815,4 @@ void MonthViewCell::insertTodo(Todo *todo) 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 { @@ -820,3 +823,4 @@ void MonthViewCell::insertTodo(Todo *todo) 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 { diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index e679bd3..65f0342 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -499,2 +499,3 @@ QColor KOPrefs::defaultColor( int calNum ) const { + if ( calNum == 1 ) return mEventColor; return (mDefCalColors[calNum-1])->mDefaultColor; diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 3ee9a22..35a56ca 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -1467,3 +1467,2 @@ void KOPrefsDialog::usrWriteConfig() KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; - } |