summaryrefslogtreecommitdiffabout
path: root/korganizer/kodaymatrix.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kodaymatrix.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kodaymatrix.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 366e8b8..59618bf 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -662,4 +662,4 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
{
- QRect sz = frameRect();
- if ( sz.width() <= 0 || sz.height() <= 0 )
+
+ if ( width() <= 0 || height() <= 0 )
return;
@@ -669,4 +669,4 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
}
- if ( myPix.width() != sz.width() || myPix.height()!=sz.height() ) {
- myPix.resize(sz.size() );
+ if ( myPix.width() != width() || myPix.height()!=height() ) {
+ myPix.resize(size() );
}
@@ -681,4 +681,4 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
int xyOff = frameWidth();
- int colModulo = sz.width() % 7;
- int rowModulo = sz.height() % 6;
+ int colModulo = (width()-2) % 7;
+ int rowModulo = (height()-2) % 6;
//qDebug("col %d row %d ",colModulo,rowModulo );
@@ -688,5 +688,5 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
// draw background and topleft frame
- p.fillRect(pevent->rect(), mDefaultBackColor);
+ p.fillRect(0,0,width(),height(), mDefaultBackColor);
p.setPen(mDefaultTextColor);
- p.drawRect(0, 0, sz.width()+1, sz.height()+1);
+ p.drawRect(0, 0, width(), height());
int mSelStartT = mSelStart;
@@ -765,3 +765,4 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
addRow = 1;
- p.fillRect(isRTL ? 0 : col*dwidth+1+addCol2, row*dheight+addRow, (7-col)*dwidth+colModulo,
+ int drawWid = width()-(col*dwidth+1+addCol2)-1;
+ p.fillRect(isRTL ? 0 : col*dwidth+1+addCol2, row*dheight+addRow, drawWid,
dheight+1, selcol);
@@ -916,3 +917,3 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
}
- int off = xyOff;
+ int off = 0;//xyOff;
bitBlt (this, off, off, &myPix, 0 ,0,width(), height() ,CopyROP);