summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp26
-rw-r--r--korganizer/komonthview.cpp13
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()
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 ;
@@ -452,4 +455,7 @@ 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 ;
@@ -459,4 +465,7 @@ 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 ;
@@ -527,3 +536,2 @@ void KOAgendaItem::computeText()
{
-
mDisplayedText = mIncidence->summary();
@@ -555,3 +563,3 @@ void KOAgendaItem::computeText()
}
-
+#ifdef DESKTOP_VERSION
QString tipText = mIncidence->summary();
@@ -585,3 +593,3 @@ void KOAgendaItem::computeText()
QToolTip::add(this,tipText,toolTipGroup(),"");
-
+#endif
}
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)
{
+ bool useToolTips = true;
+#ifndef DEKSTOP_VERSION
+ useToolTips = false;
+#endif
QString mToolTipText;
@@ -689,2 +693,3 @@ int MonthViewCell::insertEvent(Event *event)
text = time + event->summary();
+ if ( useToolTips )
mToolTipText += prefix + text;
@@ -693,2 +698,3 @@ int MonthViewCell::insertEvent(Event *event)
text = event->summary();
+ if ( useToolTips )
mToolTipText += text;
@@ -698,2 +704,3 @@ int MonthViewCell::insertEvent(Event *event)
text += " " + event->summary();
+ if ( useToolTips )
mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary();
@@ -701,2 +708,5 @@ int MonthViewCell::insertEvent(Event *event)
}
+ if ( useToolTips && ! event->location().isEmpty() ) {
+ mToolTipText += " (" + event->location() +")";
+ }
MonthViewItem *item ;
@@ -766,2 +776,3 @@ int MonthViewCell::insertEvent(Event *event)
}
+ if ( useToolTips )
mToolTip.append( mToolTipText );
@@ -818,3 +829,5 @@ void MonthViewCell::insertTodo(Todo *todo)
insertItem( item , count());
+#ifdef DESKTOP_VERSION
mToolTip.append( text );
+#endif
}