author | zautrix <zautrix> | 2005-04-08 10:54:05 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-08 10:54:05 (UTC) |
commit | 59fb8a0ac35bf3b81f1c4e2e4fc6b61356d064ef (patch) (side-by-side diff) | |
tree | ab604082029c081fa8725c5535a51a23bb963ef2 /korganizer | |
parent | c82f9b40f6023dc7b39ac555cba8c4c313f15ca8 (diff) | |
download | kdepimpi-59fb8a0ac35bf3b81f1c4e2e4fc6b61356d064ef.zip kdepimpi-59fb8a0ac35bf3b81f1c4e2e4fc6b61356d064ef.tar.gz kdepimpi-59fb8a0ac35bf3b81f1c4e2e4fc6b61356d064ef.tar.bz2 |
fixes
-rw-r--r-- | korganizer/koagendaitem.cpp | 26 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 13 |
2 files changed, 30 insertions, 9 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 23afe7a..e545ca8 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -444,6 +444,9 @@ QPixmap * KOAgendaItem::paintPix() { static QPixmap* mPaintPix = 0; - if ( ! mPaintPix ) - mPaintPix = new QPixmap(1,1); + if ( ! mPaintPix ) { + int w = QApplication::desktop()->width(); + int h = QApplication::desktop()->height(); + mPaintPix = new QPixmap(w,h); + } return mPaintPix ; } @@ -451,6 +454,9 @@ QPixmap * KOAgendaItem::paintPixAllday() { static QPixmap* mPaintPixA = 0; - if ( ! mPaintPixA ) - mPaintPixA = new QPixmap(1,1); + if ( ! mPaintPixA ) { + int w = QApplication::desktop()->width(); + int h = QApplication::desktop()->height()/3; + mPaintPixA = new QPixmap(w,h); + } return mPaintPixA ; } @@ -458,6 +464,9 @@ QPixmap * KOAgendaItem::paintPixSel() { static QPixmap* mPaintPixSel = 0; - if ( ! mPaintPixSel ) - mPaintPixSel = new QPixmap(1,1); + if ( ! mPaintPixSel ) { + int w = QApplication::desktop()->width(); + int h = QApplication::desktop()->height(); + mPaintPixSel = new QPixmap(w,h); + } return mPaintPixSel ; } @@ -526,5 +535,4 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e ) void KOAgendaItem::computeText() { - mDisplayedText = mIncidence->summary(); if ( (mIncidence->type() == "Todo") ) { @@ -554,5 +562,5 @@ void KOAgendaItem::computeText() mDisplayedText += mIncidence->location() +")"; } - +#ifdef DESKTOP_VERSION QString tipText = mIncidence->summary(); if ( !mIncidence->doesFloat() ) { @@ -584,5 +592,5 @@ void KOAgendaItem::computeText() } QToolTip::add(this,tipText,toolTipGroup(),""); - +#endif } void KOAgendaItem::updateItem() diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 4dfb9df..65d6acf 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -642,4 +642,8 @@ void MonthViewCell::startUpdateCell() int MonthViewCell::insertEvent(Event *event) { + bool useToolTips = true; +#ifndef DEKSTOP_VERSION + useToolTips = false; +#endif QString mToolTipText; setFocusPolicy(WheelFocus); @@ -688,8 +692,10 @@ int MonthViewCell::insertEvent(Event *event) } text = time + event->summary(); + if ( useToolTips ) mToolTipText += prefix + text; } else { if (event->doesFloat()) { text = event->summary(); + if ( useToolTips ) mToolTipText += text; } @@ -697,7 +703,11 @@ int MonthViewCell::insertEvent(Event *event) text = KGlobal::locale()->formatTime(event->dtStart().time()); text += " " + event->summary(); + if ( useToolTips ) mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); } } + if ( useToolTips && ! event->location().isEmpty() ) { + mToolTipText += " (" + event->location() +")"; + } MonthViewItem *item ; @@ -765,4 +775,5 @@ int MonthViewCell::insertEvent(Event *event) insertItem( item ,pos); } + if ( useToolTips ) mToolTip.append( mToolTipText ); return mdayCount; @@ -817,5 +828,7 @@ void MonthViewCell::insertTodo(Todo *todo) item->setMoreInfo( todo->description().length() > 0 ); insertItem( item , count()); +#ifdef DESKTOP_VERSION mToolTip.append( text ); +#endif } void MonthViewCell::repaintfinishUpdateCell() |