-rw-r--r-- | korganizer/calendarview.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 42166ab..608b73b 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -144,3 +144,3 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden mAlarms = alarms; - setBackgroundColor( QColor( 86, 153, 205 ) ); + viewport()->setBackgroundColor( QColor( 255, 255, 255 ) ); QString mText = "<table width=\"100%\">\n"; @@ -161,3 +161,3 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden #endif - mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; + //mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; @@ -165,3 +165,3 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden int time = 0; - mText += "<table>"; + //mText += "<table>"; while ( inc ) { @@ -189,4 +189,9 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": "; - if ( dt.date() == QDate::currentDate() && time == 0 ) { + if ( dt.date() < QDate::currentDate() && time == 0 ) { + mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; + mText += "<table>"; time = 1; + } + if ( dt.date() == QDate::currentDate() && time <= 1 ) { + if ( time > 0 ) mText +="</table>"; @@ -194,6 +199,7 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden mText += "<table>"; + time = 2; } - if ( dt.date() > QDate::currentDate() && time != 2 ) { - time = 2; + if ( dt.date() > QDate::currentDate() && time <= 2 ) { + if ( time > 0 ) mText +="</table>"; @@ -201,2 +207,3 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden mText += "<table>"; + time = 3; } @@ -636,3 +643,3 @@ void CalendarView::checkAlarms() int secs = config->readNumEntry( "LatestProgramStop" ) - 30; - secs -= ( 3600 * 24*3 ); // debug only + //secs -= ( 3600 * 24*3 ); // debug only QDateTime latest = dt.addSecs ( secs ); @@ -664,2 +671,8 @@ void CalendarView::checkAlarms() lay->addWidget( matb ); + if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) { + int wid = 210; + int x = QApplication::desktop()->width() - wid - 7; + int y = QApplication::desktop()->height() - wid - 70; + dia->setGeometry ( x,y,wid,wid); + } else { int si = 220; @@ -668,2 +681,3 @@ void CalendarView::checkAlarms() dia->resize(si,si/2); + } dia->setBackgroundColor( QColor( 255, 255, 255 ) ); |