summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 6294b98..0ef5ae4 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -1158,13 +1158,14 @@ void KOMonthView::computeLayoutWeek()
y += hei/(5-daysToShow);
x = 0;
w = colWid;
}
- if ( i == daysToShow-colModulo )
+ if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
++w;
+ }
if ( i >= 5 ) {
- mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2+1,h);
- x -= w/2 ;
+ mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h);
+ x -= (w/2 );
}
else
mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
x += w;
@@ -1190,8 +1191,11 @@ void KOMonthView::computeLayoutWeek()
if ( i ==5 ) {
mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 );
x -= w ;y += h/2;
} else {
+ if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) {
+ ++w;
+ }
mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 );
y -= h/2;
}
} else