author | zautrix <zautrix> | 2005-07-04 21:23:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-04 21:23:46 (UTC) |
commit | 35f1ad23e06a0f6014d98c952e8b8652b5cffc49 (patch) (side-by-side diff) | |
tree | 4c3b222a9d2baff7b43c366bb0bfa1fab24a5177 | |
parent | 2767ffda27fa0e88816832d4b2c6efdd0c52a8eb (diff) | |
download | kdepimpi-35f1ad23e06a0f6014d98c952e8b8652b5cffc49.zip kdepimpi-35f1ad23e06a0f6014d98c952e8b8652b5cffc49.tar.gz kdepimpi-35f1ad23e06a0f6014d98c952e8b8652b5cffc49.tar.bz2 |
highlight pix smaller
-rw-r--r-- | korganizer/koagenda.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 63fdecd..9b817bc 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -1414,10 +1414,11 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i //--cx;++cw; int lGridSpacingY = mGridSpacingY*2; int selDay; - if ( !backgroundOnly ) + QDate curDate = QDate::currentDate(); + if ( !backgroundOnly ) { for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) { - if ( mSelectedDates[selDay] == QDateTime::currentDateTime ().date() && KOPrefs::instance()->mHighlightCurrentDay) { + if ( mSelectedDates[selDay] == curDate && KOPrefs::instance()->mHighlightCurrentDay) { int x1 = cx; int y1 = 0; if (y1 < cy) y1 = cy; @@ -1445,6 +1446,7 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i } } } + } // Highlight working hours if ( !backgroundOnly ) @@ -1473,7 +1475,7 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i (mColumns - gxStart)*mGridSpacingX-1 : (gxStart+1)*mGridSpacingX-1; if (xEnd > x2) xEnd = x2; - if ( mSelectedDates[gxStart] == QDateTime::currentDateTime ().date()&& KOPrefs::instance()->mHighlightCurrentDay ) { + if ( mSelectedDates[gxStart] == curDate && KOPrefs::instance()->mHighlightCurrentDay ) { if ( KOPrefs::instance()->mUseHighlightLightColor ) p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, KOPrefs::instance()->mWorkingHoursColor.light()); @@ -1676,15 +1678,14 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) if ( todo->hasCompletedDate() && !KOPrefs::instance()->mShowCompletedTodoInAgenda ) return; //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); - bool overdue = (!todo->isCompleted()) && (todo->dtDue() < QDate::currentDate())&& ( KOPrefs::instance()->mShowTodoInAgenda ); - QDate currentDate; + QDate currentDate = QDate::currentDate(); + bool overdue = (!todo->isCompleted()) && (todo->dtDue() < currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda ); QDateTime dt; if ( todo->hasCompletedDate() ) dt = todo->completed(); else dt = todo->dtDue(); if ( overdue ) { - currentDate = QDate::currentDate(); days += todo->dtDue().date().daysTo( currentDate ); } else |