summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-08-22 16:28:08 (UTC)
committer zautrix <zautrix>2005-08-22 16:28:08 (UTC)
commit18780cc2342097b343ee2fa50c649f425ddaed34 (patch) (side-by-side diff)
tree6ea015c45835e96451cede982ac79a518141dd29
parent4a5e2a487ee162c1e3d5ea0d1c8d4bd14a65efb9 (diff)
downloadkdepimpi-18780cc2342097b343ee2fa50c649f425ddaed34.zip
kdepimpi-18780cc2342097b343ee2fa50c649f425ddaed34.tar.gz
kdepimpi-18780cc2342097b343ee2fa50c649f425ddaed34.tar.bz2
fix for the lonng agenda float fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp4
-rw-r--r--korganizer/koagendaitem.cpp8
-rw-r--r--korganizer/koagendaitem.h2
-rw-r--r--korganizer/koagendaview.cpp1
4 files changed, 8 insertions, 7 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 796d633..d9d1283 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1838,3 +1838,3 @@ KOAgendaItem *KOAgenda::insertAllDayItem (Incidence *event,QDate qd,int XBegin,i
}
-
+ //qDebug("insertallday %s -- %d - %d ",qd.toString().latin1(), XBegin, XEnd );
KOAgendaItem *agendaItem = getNewItem(event,qd,viewport());
@@ -1843,3 +1843,3 @@ KOAgendaItem *KOAgenda::insertAllDayItem (Incidence *event,QDate qd,int XBegin,i
agendaItem->setCellXWidth(XEnd);
- agendaItem->resizeMe(mGridSpacingX, mGridSpacingX * agendaItem->cellWidth(),mGridSpacingY);
+ agendaItem->resizeMe(mGridSpacingX, mGridSpacingX * agendaItem->cellWidth(),mGridSpacingY, true );
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 7a685d8..81681df 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -584,3 +584,4 @@ void KOAgendaItem::computeText()
} else {
- mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) ;
+ int dur = 1+ (static_cast<Event*>(mIncidence))->dtStart().date().daysTo( (static_cast<Event*>(mIncidence))->dtEnd().date() );
+ mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) + " ("+QString::number( dur )+i18n(" days") +")" ;
}
@@ -660,3 +661,3 @@ int KOAgendaItem::cellHeight()
// this code is to fix this problem
-int KOAgendaItem::resizeMe( int grid, int wid, int hei )
+int KOAgendaItem::resizeMe( int grid, int wid, int hei, bool invalidWidth )
{
@@ -671,3 +672,3 @@ int KOAgendaItem::resizeMe( int grid, int wid, int hei )
}
- if ( wid == width() || diff >= wid )
+ if ( (!invalidWidth && wid == width() ) || diff >= wid )
resize( wid, hei );
@@ -675,2 +676,3 @@ int KOAgendaItem::resizeMe( int grid, int wid, int hei )
resize( wid - diff, hei );
+ //qDebug("wid %d x %d ", width(), x());
return diff;
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 97acd4c..37d89a6 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -111,3 +111,3 @@ class KOAgendaItem : public QWidget
bool isAllDay() { return mAllDay; }
- int resizeMe( int grid, int wid, int hei );
+ int resizeMe( int grid, int wid, int hei, bool invalidHei = false );
public slots:
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 1cf03a0..d8a2134 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1237,3 +1237,2 @@ void KOAgendaView::fillAgenda()
}
-
} else {