-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 | |||
@@ -132,7 +132,12 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | |||
132 | 132 | ||
133 | } | 133 | } |
134 | mColorGroup = QColorGroup( mBackgroundColor.light(), | 134 | |
135 | mBackgroundColor.dark(),mBackgroundColor.light(), | 135 | QColor BackgroundColor ( mBackgroundColor ); |
136 | mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ; | 136 | if ( mIncidence->calID() > 1 ) { |
137 | BackgroundColor = KOPrefs::instance()->defaultColor( mIncidence->calID() ); | ||
138 | } | ||
139 | mColorGroup = QColorGroup( BackgroundColor.light(), | ||
140 | BackgroundColor.dark(),BackgroundColor.light(), | ||
141 | BackgroundColor.dark(),BackgroundColor, black, BackgroundColor) ; | ||
137 | setBackgroundColor( mBackgroundColor ); | 142 | setBackgroundColor( mBackgroundColor ); |
138 | mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250); | 143 | mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250); |
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 52bc463..a653c18 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -345,4 +345,5 @@ void KOCalEditView::readConfig() | |||
345 | if ( kkf->mErrorOnLoad ) | 345 | if ( kkf->mErrorOnLoad ) |
346 | cb->setEnabled( false ); | 346 | cb->setEnabled( false ); |
347 | if ( row > 1) { | ||
347 | KColorButton *colb = new KColorButton( mw ); | 348 | KColorButton *colb = new KColorButton( mw ); |
348 | mainLayout->addWidget( colb,row,++iii ); | 349 | mainLayout->addWidget( colb,row,++iii ); |
@@ -350,5 +351,4 @@ void KOCalEditView::readConfig() | |||
350 | colb->setColor( kkf->mDefaultColor ); | 351 | colb->setColor( kkf->mDefaultColor ); |
351 | connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) ); | 352 | connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) ); |
352 | if ( row > 1) { | ||
353 | KOCalButton* calb = new KOCalButton( mw ); | 353 | KOCalButton* calb = new KOCalButton( mw ); |
354 | mainLayout->addWidget( calb,row,++iii ); | 354 | mainLayout->addWidget( calb,row,++iii ); |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 96f2502..2150654 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -731,5 +731,6 @@ int MonthViewCell::insertEvent(Event *event) | |||
731 | pal = getPalette(); | 731 | pal = getPalette(); |
732 | if (cat.isEmpty()) { | 732 | if (cat.isEmpty()) { |
733 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); | 733 | //pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); |
734 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->defaultColor( event->calID() )); | ||
734 | } else { | 735 | } else { |
735 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); | 736 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); |
@@ -738,5 +739,6 @@ int MonthViewCell::insertEvent(Event *event) | |||
738 | } else { | 739 | } else { |
739 | if (cat.isEmpty()) { | 740 | if (cat.isEmpty()) { |
740 | pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); | 741 | //pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); |
742 | pal = QPalette( KOPrefs::instance()->defaultColor( event->calID() ), KOPrefs::instance()->defaultColor( event->calID() )); | ||
741 | } else { | 743 | } else { |
742 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); | 744 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); |
@@ -812,5 +814,6 @@ void MonthViewCell::insertTodo(Todo *todo) | |||
812 | pal = getPalette(); | 814 | pal = getPalette(); |
813 | if (cat.isEmpty()) { | 815 | if (cat.isEmpty()) { |
814 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); | 816 | //pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); |
817 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->defaultColor( todo->calID() )); | ||
815 | } else { | 818 | } else { |
816 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); | 819 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); |
@@ -819,5 +822,6 @@ void MonthViewCell::insertTodo(Todo *todo) | |||
819 | } else { | 822 | } else { |
820 | if (cat.isEmpty()) { | 823 | if (cat.isEmpty()) { |
821 | pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); | 824 | //pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); |
825 | pal = QPalette(KOPrefs::instance()->defaultColor( todo->calID() ), KOPrefs::instance()->defaultColor( todo->calID() )); | ||
822 | } else { | 826 | } else { |
823 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); | 827 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index e679bd3..65f0342 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -498,4 +498,5 @@ void KOPrefs::deleteCalendar( int num ) | |||
498 | QColor KOPrefs::defaultColor( int calNum ) const | 498 | QColor KOPrefs::defaultColor( int calNum ) const |
499 | { | 499 | { |
500 | if ( calNum == 1 ) return mEventColor; | ||
500 | return (mDefCalColors[calNum-1])->mDefaultColor; | 501 | return (mDefCalColors[calNum-1])->mDefaultColor; |
501 | } | 502 | } |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 3ee9a22..35a56ca 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -1466,5 +1466,4 @@ void KOPrefsDialog::usrWriteConfig() | |||
1466 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; | 1466 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; |
1467 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; | 1467 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; |
1468 | |||
1469 | } | 1468 | } |
1470 | 1469 | ||