-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 | |||
@@ -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(); |
@@ -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,2 +693,3 @@ int MonthViewCell::insertEvent(Event *event) | |||
689 | text = time + event->summary(); | 693 | text = time + event->summary(); |
694 | if ( useToolTips ) | ||
690 | mToolTipText += prefix + text; | 695 | mToolTipText += prefix + text; |
@@ -693,2 +698,3 @@ int MonthViewCell::insertEvent(Event *event) | |||
693 | text = event->summary(); | 698 | text = event->summary(); |
699 | if ( useToolTips ) | ||
694 | mToolTipText += text; | 700 | mToolTipText += text; |
@@ -698,2 +704,3 @@ int MonthViewCell::insertEvent(Event *event) | |||
698 | text += " " + event->summary(); | 704 | text += " " + event->summary(); |
705 | if ( useToolTips ) | ||
699 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); | 706 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); |
@@ -701,2 +708,5 @@ int MonthViewCell::insertEvent(Event *event) | |||
701 | } | 708 | } |
709 | if ( useToolTips && ! event->location().isEmpty() ) { | ||
710 | mToolTipText += " (" + event->location() +")"; | ||
711 | } | ||
702 | MonthViewItem *item ; | 712 | MonthViewItem *item ; |
@@ -766,2 +776,3 @@ int MonthViewCell::insertEvent(Event *event) | |||
766 | } | 776 | } |
777 | if ( useToolTips ) | ||
767 | mToolTip.append( mToolTipText ); | 778 | mToolTip.append( mToolTipText ); |
@@ -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 | } |