-rw-r--r-- | korganizer/komonthview.cpp | 10 |
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 @@ -1156,17 +1156,18 @@ void KOMonthView::computeLayoutWeek() for ( i = 0; i < 7; i++) { if ( i && !( i % daysToShow) && i < 6) { 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; } x= 0; @@ -1188,12 +1189,15 @@ void KOMonthView::computeLayoutWeek() if ( i >= 5 ) { 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 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h ); |