author | zautrix <zautrix> | 2005-01-31 09:56:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-31 09:56:31 (UTC) |
commit | 3e0b1c7cd48903b6886e081210cd83b7441b48ac (patch) (side-by-side diff) | |
tree | 69c1937849a14b137df9c76285e061b1f4620df7 | |
parent | 1c5f4d993bf5eeb4a21bacf61671a1a08ed1f3cd (diff) | |
download | kdepimpi-3e0b1c7cd48903b6886e081210cd83b7441b48ac.zip kdepimpi-3e0b1c7cd48903b6886e081210cd83b7441b48ac.tar.gz kdepimpi-3e0b1c7cd48903b6886e081210cd83b7441b48ac.tar.bz2 |
color fixes
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 8 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 1 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 6 |
5 files changed, 17 insertions, 1 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index eec0b38..00f5c28 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1203,9 +1203,9 @@ { "Display all opened","Zeige alle geöffnet" }, { "Display all closed","Zeige alle geschlossen" }, { "Display all flat","Zeige alle flach" }, { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, -{ "","" }, +{ "Default todo done color:","Standard Todo erledigt Farbe" }, { "","" }, { "","" }, { "","" }, { "","" }, diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index ee9f39a..a05c60e 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -93,12 +93,20 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) else { QStringList categories = mIncidence->categories(); QString cat = categories.first(); if (cat.isEmpty()) { + if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) + mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; + else mBackgroundColor =KOPrefs::instance()->mEventColor; } else { mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); + if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) { + if ( mBackgroundColor == KOPrefs::instance()->mEventColor ) + mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; + } } + } mColorGroup = QColorGroup( mBackgroundColor.light(), mBackgroundColor.dark(),mBackgroundColor.light(), mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ; diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 32cc291..0548f14 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -196,8 +196,9 @@ KOPrefs::KOPrefs() : KPrefs::setCurrentGroup("Colors"); addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); + addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index b3acda7..8b849fa 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -122,8 +122,9 @@ class KOPrefs : public KPimPrefs QColor mHolidayColor; QColor mHighlightColor; QColor mEventColor; + QColor mTodoDoneColor; QColor mAgendaBgColor; QColor mWorkingHoursColor; QColor mTodoDueTodayColor; QColor mTodoOverdueColor; diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 1b24f56..580dff2 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -1175,8 +1175,14 @@ void KOPrefsDialog::setupColorsTab() addWidColor(i18n("Default event color:"), &(KOPrefs::instance()->mEventColor),topFrame); topLayout->addWidget(eventColor->label(),ii,0); topLayout->addWidget(eventColor->button(),ii++,1); + eventColor = + addWidColor(i18n("Default todo done color:"), + &(KOPrefs::instance()->mTodoDoneColor),topFrame); + topLayout->addWidget(eventColor->label(),ii,0); + topLayout->addWidget(eventColor->button(),ii++,1); + // agenda view background color KPrefsDialogWidColor *agendaBgColor = addWidColor(i18n("Agenda view background color:"), |