summaryrefslogtreecommitdiff
authorumopapisdn <umopapisdn>2003-03-28 12:06:00 (UTC)
committer umopapisdn <umopapisdn>2003-03-28 12:06:00 (UTC)
commit8e8803488d2c11b12449e785802da4a5a9adad0f (patch) (side-by-side diff)
tree2c7b5ae7e1d6151a3ee89e755f5afb649c1c653c
parent6cee1b34ffc7b3b8a0c8e1831fff0cc1af0e708a (diff)
downloadopie-8e8803488d2c11b12449e785802da4a5a9adad0f.zip
opie-8e8803488d2c11b12449e785802da4a5a9adad0f.tar.gz
opie-8e8803488d2c11b12449e785802da4a5a9adad0f.tar.bz2
Minimum size in weekview should be dependant on the height of the window.
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
@@ -196,8 +196,6 @@ void DateBookWeekView::positionItem( DateBookWeekItem *i )
y2 += db_round30min( ev.end().minute() );
- if ( y > 47 )
- y = 47;
- if ( y2 > 48 )
- y2 = 48;
- y = y * rowHeight / 2;
- y2 = y2 * rowHeight / 2;
+ if ( y > 47 ) y = 47;
+ if ( y2 > 48 ) y2 = 48;
+ y = (y * rowHeight) / 2;
+ y2 = (y2 * rowHeight) / 2;
@@ -205,7 +203,7 @@ void DateBookWeekView::positionItem( DateBookWeekItem *i )
if ( ev.event().type() == Event::AllDay ) {
- h = 48 * rowHeight / 2;
- y = 0;
- } else {
- h=y2-y;
- if ( h < 1 ) h = 1;
+ h = (48 * rowHeight) / 2;
+ y = 0;
+ } else {
+ h=y2-y;
+ if ( h < (1*rowHeight)/2 ) h = (1*rowHeight)/2;
}