-rw-r--r-- | korganizer/koagendaitem.cpp | 28 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 21 |
2 files changed, 35 insertions, 14 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 23afe7a..e545ca8 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -445,4 +445,7 @@ QPixmap * KOAgendaItem::paintPix() | |||
445 | static QPixmap* mPaintPix = 0; | 445 | static QPixmap* mPaintPix = 0; |
446 | if ( ! mPaintPix ) | 446 | if ( ! mPaintPix ) { |
447 | mPaintPix = new QPixmap(1,1); | 447 | int w = QApplication::desktop()->width(); |
448 | int h = QApplication::desktop()->height(); | ||
449 | mPaintPix = new QPixmap(w,h); | ||
450 | } | ||
448 | return mPaintPix ; | 451 | return mPaintPix ; |
@@ -452,4 +455,7 @@ QPixmap * KOAgendaItem::paintPixAllday() | |||
452 | static QPixmap* mPaintPixA = 0; | 455 | static QPixmap* mPaintPixA = 0; |
453 | if ( ! mPaintPixA ) | 456 | if ( ! mPaintPixA ) { |
454 | mPaintPixA = new QPixmap(1,1); | 457 | int w = QApplication::desktop()->width(); |
458 | int h = QApplication::desktop()->height()/3; | ||
459 | mPaintPixA = new QPixmap(w,h); | ||
460 | } | ||
455 | return mPaintPixA ; | 461 | return mPaintPixA ; |
@@ -459,4 +465,7 @@ QPixmap * KOAgendaItem::paintPixSel() | |||
459 | static QPixmap* mPaintPixSel = 0; | 465 | static QPixmap* mPaintPixSel = 0; |
460 | if ( ! mPaintPixSel ) | 466 | if ( ! mPaintPixSel ) { |
461 | mPaintPixSel = new QPixmap(1,1); | 467 | int w = QApplication::desktop()->width(); |
468 | int h = QApplication::desktop()->height(); | ||
469 | mPaintPixSel = new QPixmap(w,h); | ||
470 | } | ||
462 | return mPaintPixSel ; | 471 | return mPaintPixSel ; |
@@ -527,3 +536,2 @@ void KOAgendaItem::computeText() | |||
527 | { | 536 | { |
528 | |||
529 | mDisplayedText = mIncidence->summary(); | 537 | mDisplayedText = mIncidence->summary(); |
@@ -538,3 +546,3 @@ void KOAgendaItem::computeText() | |||
538 | if ( !(mIncidence->doesFloat()) && KOPrefs::instance()->mShowTimeInAgenda) | 546 | if ( !(mIncidence->doesFloat()) && KOPrefs::instance()->mShowTimeInAgenda) |
539 | mDisplayedText += ": " +KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtStart().time()) + "-" + KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtEnd().time()) ; | 547 | mDisplayedText += ": " +KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtStart().time()) + " - " + KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtEnd().time()) ; |
540 | 548 | ||
@@ -555,3 +563,3 @@ void KOAgendaItem::computeText() | |||
555 | } | 563 | } |
556 | 564 | #ifdef DESKTOP_VERSION | |
557 | QString tipText = mIncidence->summary(); | 565 | QString tipText = mIncidence->summary(); |
@@ -585,3 +593,3 @@ void KOAgendaItem::computeText() | |||
585 | QToolTip::add(this,tipText,toolTipGroup(),""); | 593 | QToolTip::add(this,tipText,toolTipGroup(),""); |
586 | 594 | #endif | |
587 | } | 595 | } |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 4dfb9df..65d6acf 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -643,2 +643,6 @@ int MonthViewCell::insertEvent(Event *event) | |||
643 | { | 643 | { |
644 | bool useToolTips = true; | ||
645 | #ifndef DEKSTOP_VERSION | ||
646 | useToolTips = false; | ||
647 | #endif | ||
644 | QString mToolTipText; | 648 | QString mToolTipText; |
@@ -689,3 +693,4 @@ int MonthViewCell::insertEvent(Event *event) | |||
689 | text = time + event->summary(); | 693 | text = time + event->summary(); |
690 | mToolTipText += prefix + text; | 694 | if ( useToolTips ) |
695 | mToolTipText += prefix + text; | ||
691 | } else { | 696 | } else { |
@@ -693,3 +698,4 @@ int MonthViewCell::insertEvent(Event *event) | |||
693 | text = event->summary(); | 698 | text = event->summary(); |
694 | mToolTipText += text; | 699 | if ( useToolTips ) |
700 | mToolTipText += text; | ||
695 | } | 701 | } |
@@ -698,5 +704,9 @@ int MonthViewCell::insertEvent(Event *event) | |||
698 | text += " " + event->summary(); | 704 | text += " " + event->summary(); |
699 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); | 705 | if ( useToolTips ) |
706 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); | ||
700 | } | 707 | } |
701 | } | 708 | } |
709 | if ( useToolTips && ! event->location().isEmpty() ) { | ||
710 | mToolTipText += " (" + event->location() +")"; | ||
711 | } | ||
702 | MonthViewItem *item ; | 712 | MonthViewItem *item ; |
@@ -766,3 +776,4 @@ int MonthViewCell::insertEvent(Event *event) | |||
766 | } | 776 | } |
767 | mToolTip.append( mToolTipText ); | 777 | if ( useToolTips ) |
778 | mToolTip.append( mToolTipText ); | ||
768 | return mdayCount; | 779 | return mdayCount; |
@@ -818,3 +829,5 @@ void MonthViewCell::insertTodo(Todo *todo) | |||
818 | insertItem( item , count()); | 829 | insertItem( item , count()); |
830 | #ifdef DESKTOP_VERSION | ||
819 | mToolTip.append( text ); | 831 | mToolTip.append( text ); |
832 | #endif | ||
820 | } | 833 | } |