summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 6d6ae8a..e66ddce 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -1654,12 +1654,22 @@ void KOMonthView::computeLayoutWeek()
if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
++w;
}
- if ( i >= 5 ) {
- mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h);
- x -= (w/2 );
+ if ( i >= 5 ) {
+ int wi = width() - x - weeklabelwid;
+ if ( i == 5 ) {
+ mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,wi/2+wi%2,h);
+ } else {
+ mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,wi,h);
+ }
+ x = x - w + wi - (wi/2 );
+ }
+ else {
+ int wi = w;
+ if ( !(( i+1) % daysToShow)) {
+ wi = width() - x - weeklabelwid;
+ }
+ mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,wi,h);
}
- else
- mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w,h);
x += w;
}
x= 0;
@@ -1776,7 +1786,11 @@ void KOMonthView::computeLayout()
++w;
if ( combinedSatSun ) {
if ( i >= daysToShow-1 ) {
- mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h);
+
+ if ( i == 6 )
+ mDayLabels[i]->setGeometry( x+weeklabelwid,y,width()-x-weeklabelwid,h);
+ else
+ mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h);
x -= w/2 ;
}
else
@@ -1801,10 +1815,12 @@ void KOMonthView::computeLayout()
if ( combinedSatSun ) {
if ( (i)%7 >= daysToShow-1 ) {
if ( (i)%7 == daysToShow-1 ) {
+ w = width()-x-weeklabelwid;
max = h/2;
mCells[i]->setGeometry ( x+weeklabelwid,y,w,max );
x -= w ;y += h/2;
} else {
+ w = width()-x-weeklabelwid;
max = h-h/2;
mCells[i]->setGeometry ( x+weeklabelwid,y,w,max );
y -= h/2;