[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: [Kde-pim] Colors in the monthview of KOrganizer?!
From: Karsten Schulz <kaschu () t800 ! ping ! de>
Date: 2002-09-05 10:37:13
[Download RAW message or body]
Hi all,
because I use a Palm IIIx with color display and the DateBook5 calendar
software, I am used to deal with colored categories. So I really appreciate
the color support in KOrganizer!
But I wonder, why there are no colors in the month view?! IMHO this is a break
in the KOrganizers' GUI. So I played around to implement a colored monthview
and found out, that a colored background looks very ugly:
please have a look at <http://www.t800.org/bgcolor.png>
So I tried to change the text color and set it to the category color, which is
used as background color in the agenda view and in the week view:
see <http://www.t800.org/fgcolor.png>
and I must say, I really like that look :-)! The colored text gives you a
hint, to which category the incident belongs.
So, I want to suggest to apply the attached patchfile to komonthview.cpp and
get the monthview colored, too.
Comments?
have fun!
Karsten
["monthview.patch" (text/x-diff)]
--- 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() );
_______________________________________________
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/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic