summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp40
1 files changed, 27 insertions, 13 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
144 mAlarms = alarms; 144 mAlarms = alarms;
145 setBackgroundColor( QColor( 86, 153, 205 ) ); 145 viewport()->setBackgroundColor( QColor( 255, 255, 255 ) );
146 QString mText = "<table width=\"100%\">\n"; 146 QString mText = "<table width=\"100%\">\n";
@@ -161,3 +161,3 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden
161#endif 161#endif
162 mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; 162 //mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>";
163 163
@@ -165,3 +165,3 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden
165 int time = 0; 165 int time = 0;
166 mText += "<table>"; 166 //mText += "<table>";
167 while ( inc ) { 167 while ( inc ) {
@@ -189,14 +189,21 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden
189 timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": "; 189 timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": ";
190 if ( dt.date() == QDate::currentDate() && time == 0 ) { 190 if ( dt.date() < QDate::currentDate() && time == 0 ) {
191 mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>";
192 mText += "<table>";
191 time = 1; 193 time = 1;
192 mText +="</table>"; 194 }
195 if ( dt.date() == QDate::currentDate() && time <= 1 ) {
196 if ( time > 0 )
197 mText +="</table>";
193 mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>"; 198 mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>";
194 mText += "<table>"; 199 mText += "<table>";
200 time = 2;
195 201
196 } 202 }
197 if ( dt.date() > QDate::currentDate() && time != 2 ) { 203 if ( dt.date() > QDate::currentDate() && time <= 2 ) {
198 time = 2; 204 if ( time > 0 )
199 mText +="</table>"; 205 mText +="</table>";
200 mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>"; 206 mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>";
201 mText += "<table>"; 207 mText += "<table>";
208 time = 3;
202 } 209 }
@@ -636,3 +643,3 @@ void CalendarView::checkAlarms()
636 int secs = config->readNumEntry( "LatestProgramStop" ) - 30; 643 int secs = config->readNumEntry( "LatestProgramStop" ) - 30;
637 secs -= ( 3600 * 24*3 ); // debug only 644 //secs -= ( 3600 * 24*3 ); // debug only
638 QDateTime latest = dt.addSecs ( secs ); 645 QDateTime latest = dt.addSecs ( secs );
@@ -664,6 +671,13 @@ void CalendarView::checkAlarms()
664 lay->addWidget( matb ); 671 lay->addWidget( matb );
665 int si = 220; 672 if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) {
666 if ( QApplication::desktop()->width() > 470 ) 673 int wid = 210;
667 si = 400; 674 int x = QApplication::desktop()->width() - wid - 7;
668 dia->resize(si,si/2); 675 int y = QApplication::desktop()->height() - wid - 70;
676 dia->setGeometry ( x,y,wid,wid);
677 } else {
678 int si = 220;
679 if ( QApplication::desktop()->width() > 470 )
680 si = 400;
681 dia->resize(si,si/2);
682 }
669 dia->setBackgroundColor( QColor( 255, 255, 255 ) ); 683 dia->setBackgroundColor( QColor( 255, 255, 255 ) );