-rw-r--r-- | korganizer/calendarview.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index c01be9b..5132f98 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -143,24 +143,24 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden { mAlarms = alarms; setBackgroundColor( QColor( 86, 153, 205 ) ); QString mText = "<table width=\"100%\">\n"; //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; #ifdef DESKTOP_VERSION - mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h1>"; -#else mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>"; +#else + mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h3>"; #endif // mText += "<img src=\""; // mText += ipath; // mText += "\">"; //mEventDate = QDate::currentDate(); #ifdef DESKTOP_VERSION - mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h1>"; -#else mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h2>"; +#else + mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h3>"; #endif mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; Incidence * inc = getNextInc( start ); int time = 0; mText += "<table>"; @@ -647,22 +647,26 @@ void CalendarView::checkAlarms() qDebug("found missed alarm: %s ", inL->summary().latin1() ); } } inL = el.next(); } if ( al.count() ) { - QDialog dia ( this, "huhu", true ); - dia.setCaption( i18n("KO/Pi: Missing alarm notification!") ); - QVBoxLayout* lay = new QVBoxLayout( &dia ); - lay->setSpacing( 3 ); - lay->setMargin( 3 ); - MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( &dia, al, latest ); + QDialog* dia = new QDialog( this, "huhu", false ); + dia->setCaption( i18n("KO/Pi: Missing alarm notification!") ); + QVBoxLayout* lay = new QVBoxLayout( dia ); + lay->setSpacing( 0 ); + lay->setMargin( 0 ); + MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); lay->addWidget( matb ); - dia.resize(240,240); - dia.exec(); + int si = 220; + if ( QApplication::desktop()->width() > 470 ) + si = 400; + dia->resize(si,si/2); + dia->setBackgroundColor( QColor( 255, 255, 255 ) ); + dia->show(); } } void CalendarView::showDay( QDate d ) { dateNavigator()->blockSignals( true ); |