--------------Boundary-00=_16OYSX9KGGRYFSIB2OCO Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, because I use a Palm IIIx with color display and the DateBook5 calendar =20 software, I am used to deal with colored categories. So I really apprecia= te=20 the color support in KOrganizer! But I wonder, why there are no colors in the month view?! IMHO this is a = break=20 in the KOrganizers' GUI. So I played around to implement a colored monthv= iew=20 and found out, that a colored background looks very ugly: please have a look at So I tried to change the text color and set it to the category color, whi= ch is=20 used as background color in the agenda view and in the week view: see and I must say, I really like that look :-)! The colored text gives you a= =20 hint, to which category the incident belongs. So, I want to suggest to apply the attached patchfile to komonthview.cpp = and=20 get the monthview colored, too. Comments? have fun! Karsten --------------Boundary-00=_16OYSX9KGGRYFSIB2OCO Content-Type: text/x-diff; charset="us-ascii"; name="monthview.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="monthview.patch" --- komonthview_ORIG.cpp Thu Sep 5 10:42:43 2002 +++ komonthview.cpp Thu Sep 5 10:45:14 2002 @@ -149,7 +149,7 @@ else yPos = pmheight/2 - fm.height()/2 + fm.ascent(); - p->setPen( palette().color( QPalette::Normal, QColorGroup::Foreground ) ); + p->setPen( palette().color( QPalette::Normal, QColorGroup::Background ) ); p->drawText( x, yPos, text() ); } @@ -316,7 +316,13 @@ } MonthViewItem *item = new MonthViewItem( event, mDate, text ); - item->setPalette( mStandardPalette ); + QStringList categories = event->categories(); + QString cat = categories.first(); + if (cat.isEmpty()) { + item->setPalette(QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor)); + } else { + item->setPalette(QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)))); + } item->setRecur( event->recurrence()->doesRecur() ); item->setAlarm( event->isAlarmEnabled() ); --------------Boundary-00=_16OYSX9KGGRYFSIB2OCO-- _______________________________________________ kde-pim mailing list kde-pim@mail.kde.org http://mail.kde.org/mailman/listinfo/kde-pim kde-pim home page at http://pim.kde.org/