summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 6d6ae8a..e66ddce 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -1657,7 +1657,17 @@ void KOMonthView::computeLayoutWeek()
if ( i >= 5 ) {
- mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h);
- x -= (w/2 );
+ 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;
@@ -1778,2 +1788,6 @@ void KOMonthView::computeLayout()
if ( i >= daysToShow-1 ) {
+
+ if ( i == 6 )
+ mDayLabels[i]->setGeometry( x+weeklabelwid,y,width()-x-weeklabelwid,h);
+ else
mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h);
@@ -1803,2 +1817,3 @@ void KOMonthView::computeLayout()
if ( (i)%7 == daysToShow-1 ) {
+ w = width()-x-weeklabelwid;
max = h/2;
@@ -1807,2 +1822,3 @@ void KOMonthView::computeLayout()
} else {
+ w = width()-x-weeklabelwid;
max = h-h/2;