summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookweek.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/core/pim/datebook/datebookweek.cpp b/core/pim/datebook/datebookweek.cpp
index 874cf24..8241655 100644
--- a/core/pim/datebook/datebookweek.cpp
+++ b/core/pim/datebook/datebookweek.cpp
@@ -195,18 +195,16 @@ void DateBookWeekView::positionItem( DateBookWeekItem *i )
195 int y2 = ev.end().hour() * 2; 195 int y2 = ev.end().hour() * 2;
196 y2 += db_round30min( ev.end().minute() ); 196 y2 += db_round30min( ev.end().minute() );
197 if ( y > 47 ) 197 if ( y > 47 ) y = 47;
198 y = 47; 198 if ( y2 > 48 ) y2 = 48;
199 if ( y2 > 48 ) 199 y = (y * rowHeight) / 2;
200 y2 = 48; 200 y2 = (y2 * rowHeight) / 2;
201 y = y * rowHeight / 2;
202 y2 = y2 * rowHeight / 2;
203 201
204 int h; 202 int h;
205 if ( ev.event().type() == Event::AllDay ) { 203 if ( ev.event().type() == Event::AllDay ) {
206 h = 48 * rowHeight / 2; 204 h = (48 * rowHeight) / 2;
207 y = 0; 205 y = 0;
208 } else { 206 } else {
209 h=y2-y; 207 h=y2-y;
210 if ( h < 1 ) h = 1; 208 if ( h < (1*rowHeight)/2 ) h = (1*rowHeight)/2;
211 } 209 }
212 210