summaryrefslogtreecommitdiff
authoralwin <alwin>2005-03-20 18:29:19 (UTC)
committer alwin <alwin>2005-03-20 18:29:19 (UTC)
commitee29d99e2af9837b61ece67ebb54f2cbdfc50732 (patch) (side-by-side diff)
tree34642ff35645ec9cd4fa182ca9d35d7c2739210b
parentd330608d5c2713f8bde051b91382d0e0e54317ba (diff)
downloadopie-ee29d99e2af9837b61ece67ebb54f2cbdfc50732.zip
opie-ee29d99e2af9837b61ece67ebb54f2cbdfc50732.tar.gz
opie-ee29d99e2af9837b61ece67ebb54f2cbdfc50732.tar.bz2
made monthview colors a little bit darker so them will visible on bright
displays
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/datebookmonth.cpp11
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
@@ -20,24 +20,27 @@
#include "config.h"
#include "datebookmonth.h"
#include "datebookdb.h"
#include "resource.h"
#include <qpe/qpeapplication.h>
#include <qtoolbutton.h>
#include <qspinbox.h>
#include <qcombobox.h>
#include <qvaluestack.h>
#include <qwhatsthis.h>
+static const QColor s_colorNormalLight = QColor(255, 150, 150);
+static const QColor s_colorRepeatLight = QColor(150, 150, 255);
+static const QColor s_colorHolidayLight= QColor(150, 255, 150);
DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name )
: QHBox( parent, name )
{
setBackgroundMode( PaletteButton );
begin = new QToolButton( this );
begin->setFocusPolicy(NoFocus);
begin->setPixmap( Resource::loadPixmap( "start" ) );
begin->setAutoRaise( TRUE );
begin->setFixedSize( begin->sizeHint() );
QWhatsThis::add( begin, tr("Show January in the selected year") );
@@ -601,38 +604,38 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg,
repeatLine.push(eLine);
}
}
}
// draw the background
if (normalAllDay || repeatAllDay || travelAllDay || holidayAllDay) {
p->save();
if (normalAllDay)
if (repeatAllDay) {
p->fillRect( 0, 0, cr.width(), cr.height() / 2,
- colorNormalLight );
+ s_colorNormalLight );
p->fillRect( 0, cr.height() / 2, cr.width(), cr.height() / 2,
colorRepeatLight );
} else {
if (!holidayAllDay) {
p->fillRect( 0, 0, cr.width(), cr.height(),
- colorNormalLight );
+ s_colorNormalLight );
} else {
p->fillRect( 0, 0, cr.width(), cr.height(),
- QColor(0,220,0) );
+ s_colorHolidayLight );
}
} else if (repeatAllDay) {
p->fillRect( 0, 0, cr.width(), cr.height(),
- colorRepeatLight );
+ s_colorRepeatLight );
}
} else {
p->fillRect( 0, 0, cr.width(),
cr.height(), selected
? g.brush( QColorGroup::Highlight )
: g.brush( QColorGroup::Base ) );
}
// The lines
// now for the lines.
int h = 5;
int y = cr.height() / 2 - h;