summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/datebookmonth.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/library/datebookmonth.cpp b/library/datebookmonth.cpp
index 421559e..013ab66 100644
--- a/library/datebookmonth.cpp
+++ b/library/datebookmonth.cpp
@@ -548,4 +548,5 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg,
bool repeatAllDay = FALSE;
bool travelAllDay = FALSE;
+ bool holidayAllDay = FALSE;
QValueListIterator<EffectiveEvent> itDays = d->mDayEvents.begin();
@@ -559,8 +560,12 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg,
if (ev.isAllDay()) {
- if (!ev.hasRepeat())
+ if (!ev.hasRepeat()) {
normalAllDay = TRUE;
- else
+ if (!ev.isValidUid()) {
+ holidayAllDay = TRUE;
+ }
+ } else {
repeatAllDay = TRUE;
+ }
} else {
int sLine, eLine;
@@ -600,5 +605,5 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg,
// draw the background
- if (normalAllDay || repeatAllDay || travelAllDay) {
+ if (normalAllDay || repeatAllDay || travelAllDay || holidayAllDay) {
p->save();
@@ -609,10 +614,16 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg,
p->fillRect( 0, cr.height() / 2, cr.width(), cr.height() / 2,
colorRepeatLight );
- } else
+ } else {
+ if (!holidayAllDay) {
p->fillRect( 0, 0, cr.width(), cr.height(),
colorNormalLight );
- else if (repeatAllDay)
+ } else {
+ p->fillRect( 0, 0, cr.width(), cr.height(),
+ QColor(0,220,0) );
+ }
+ } else if (repeatAllDay) {
p->fillRect( 0, 0, cr.width(), cr.height(),
colorRepeatLight );
+ }
} else {
p->fillRect( 0, 0, cr.width(),