summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-05 14:03:26 (UTC)
committer zautrix <zautrix>2005-04-05 14:03:26 (UTC)
commit637415693af8fe9974b45c355ecfdd0745617ac3 (patch) (side-by-side diff)
treef7d83828754e82b0eeb001a2837f7c3f6865d647
parente1fd021493c30106d2a31449d620ab6eaf96f18f (diff)
downloadkdepimpi-637415693af8fe9974b45c355ecfdd0745617ac3.zip
kdepimpi-637415693af8fe9974b45c355ecfdd0745617ac3.tar.gz
kdepimpi-637415693af8fe9974b45c355ecfdd0745617ac3.tar.bz2
minor pixel fixes
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
@@ -1652,17 +1652,27 @@ void KOMonthView::computeLayoutWeek()
w = colWid;
}
if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
++w;
}
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;
}
x= 0;
y= dayLabelHei;
w = colWid;
h = cellHei;
@@ -1773,12 +1783,16 @@ void KOMonthView::computeLayout()
h = dayLabelHei ;
for ( i = 0; i < 7; i++) {
if ( i == daysToShow-colModulo )
++w;
if ( combinedSatSun ) {
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);
x -= w/2 ;
}
else
mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
} else
@@ -1798,16 +1812,18 @@ void KOMonthView::computeLayout()
}
if ( i == (6-rowModulo)*7)
++h;
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;
}
} else {
max = h;