summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-31 09:56:31 (UTC)
committer zautrix <zautrix>2005-01-31 09:56:31 (UTC)
commit3e0b1c7cd48903b6886e081210cd83b7441b48ac (patch) (side-by-side diff)
tree69c1937849a14b137df9c76285e061b1f4620df7
parent1c5f4d993bf5eeb4a21bacf61671a1a08ed1f3cd (diff)
downloadkdepimpi-3e0b1c7cd48903b6886e081210cd83b7441b48ac.zip
kdepimpi-3e0b1c7cd48903b6886e081210cd83b7441b48ac.tar.gz
kdepimpi-3e0b1c7cd48903b6886e081210cd83b7441b48ac.tar.bz2
color fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/koagendaitem.cpp10
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/koprefsdialog.cpp6
5 files changed, 18 insertions, 2 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
@@ -1204,7 +1204,7 @@
{ "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
@@ -94,10 +94,18 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
QStringList categories = mIncidence->categories();
QString cat = categories.first();
if (cat.isEmpty()) {
- mBackgroundColor =KOPrefs::instance()->mEventColor;
+ 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(),
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 32cc291..0548f14 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -197,6 +197,7 @@ KOPrefs::KOPrefs() :
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);
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index b3acda7..8b849fa 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -123,6 +123,7 @@ class KOPrefs : public KPimPrefs
QColor mHolidayColor;
QColor mHighlightColor;
QColor mEventColor;
+ QColor mTodoDoneColor;
QColor mAgendaBgColor;
QColor mWorkingHoursColor;
QColor mTodoDueTodayColor;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 1b24f56..580dff2 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1176,6 +1176,12 @@ void KOPrefsDialog::setupColorsTab()
&(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 =