-rw-r--r-- | library/datebookmonth.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/library/datebookmonth.cpp b/library/datebookmonth.cpp index 013ab66..2616b7b 100644 --- a/library/datebookmonth.cpp +++ b/library/datebookmonth.cpp | |||
@@ -26,12 +26,15 @@ | |||
26 | #include <qtoolbutton.h> | 26 | #include <qtoolbutton.h> |
27 | #include <qspinbox.h> | 27 | #include <qspinbox.h> |
28 | #include <qcombobox.h> | 28 | #include <qcombobox.h> |
29 | #include <qvaluestack.h> | 29 | #include <qvaluestack.h> |
30 | #include <qwhatsthis.h> | 30 | #include <qwhatsthis.h> |
31 | 31 | ||
32 | static const QColor s_colorNormalLight = QColor(255, 150, 150); | ||
33 | static const QColor s_colorRepeatLight = QColor(150, 150, 255); | ||
34 | static const QColor s_colorHolidayLight= QColor(150, 255, 150); | ||
32 | 35 | ||
33 | DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name ) | 36 | DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name ) |
34 | : QHBox( parent, name ) | 37 | : QHBox( parent, name ) |
35 | { | 38 | { |
36 | setBackgroundMode( PaletteButton ); | 39 | setBackgroundMode( PaletteButton ); |
37 | 40 | ||
@@ -607,26 +610,26 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg, | |||
607 | if (normalAllDay || repeatAllDay || travelAllDay || holidayAllDay) { | 610 | if (normalAllDay || repeatAllDay || travelAllDay || holidayAllDay) { |
608 | p->save(); | 611 | p->save(); |
609 | 612 | ||
610 | if (normalAllDay) | 613 | if (normalAllDay) |
611 | if (repeatAllDay) { | 614 | if (repeatAllDay) { |
612 | p->fillRect( 0, 0, cr.width(), cr.height() / 2, | 615 | p->fillRect( 0, 0, cr.width(), cr.height() / 2, |
613 | colorNormalLight ); | 616 | s_colorNormalLight ); |
614 | p->fillRect( 0, cr.height() / 2, cr.width(), cr.height() / 2, | 617 | p->fillRect( 0, cr.height() / 2, cr.width(), cr.height() / 2, |
615 | colorRepeatLight ); | 618 | colorRepeatLight ); |
616 | } else { | 619 | } else { |
617 | if (!holidayAllDay) { | 620 | if (!holidayAllDay) { |
618 | p->fillRect( 0, 0, cr.width(), cr.height(), | 621 | p->fillRect( 0, 0, cr.width(), cr.height(), |
619 | colorNormalLight ); | 622 | s_colorNormalLight ); |
620 | } else { | 623 | } else { |
621 | p->fillRect( 0, 0, cr.width(), cr.height(), | 624 | p->fillRect( 0, 0, cr.width(), cr.height(), |
622 | QColor(0,220,0) ); | 625 | s_colorHolidayLight ); |
623 | } | 626 | } |
624 | } else if (repeatAllDay) { | 627 | } else if (repeatAllDay) { |
625 | p->fillRect( 0, 0, cr.width(), cr.height(), | 628 | p->fillRect( 0, 0, cr.width(), cr.height(), |
626 | colorRepeatLight ); | 629 | s_colorRepeatLight ); |
627 | } | 630 | } |
628 | } else { | 631 | } else { |
629 | p->fillRect( 0, 0, cr.width(), | 632 | p->fillRect( 0, 0, cr.width(), |
630 | cr.height(), selected | 633 | cr.height(), selected |
631 | ? g.brush( QColorGroup::Highlight ) | 634 | ? g.brush( QColorGroup::Highlight ) |
632 | : g.brush( QColorGroup::Base ) ); | 635 | : g.brush( QColorGroup::Base ) ); |