author | zautrix <zautrix> | 2005-06-30 15:06:11 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-30 15:06:11 (UTC) |
commit | d401e425af46703a89eb80802606edeea06c9538 (patch) (side-by-side diff) | |
tree | e32a98c44e340a6af6706fa99544cba648aa19f1 /korganizer/kodaymatrix.cpp | |
parent | af48ba51eeb7a766ca7b458d2287e55c121388cf (diff) | |
download | kdepimpi-d401e425af46703a89eb80802606edeea06c9538.zip kdepimpi-d401e425af46703a89eb80802606edeea06c9538.tar.gz kdepimpi-d401e425af46703a89eb80802606edeea06c9538.tar.bz2 |
desk fixes
-rw-r--r-- | korganizer/kodaymatrix.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 067c34c..ec1154a 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -1136,81 +1136,82 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) // if it is a holiday then use the default holiday color if ( pDays.testBit(i)) { if ( bDays.testBit(i) ) { if ( hDays.testBit(i) ) p.setPen(QColor(0,200,0)); else p.setPen(QColor(Qt::blue)); } else { if (actcol == mDefaultTextColor ) { p.setPen(KOPrefs::instance()->mHolidayColor); } else { p.setPen(mHolidayColorShaded); } } } // draw selected days with special color // DO NOT specially highlight holidays in selection ! if (i >= mSelStartT && i <= mSelEndT) { ;//p.setPen(mSelectedDaysColor); } int addCol = 0; int addRow = 0; if ( colModulo ) { if ( col >= 7 - colModulo ) addCol = col - 7 + colModulo; } if ( rowModulo ) { if ( row >= 6 - rowModulo ) addRow = row - 5 + rowModulo; } //qDebug("add %d %d -- %d %d ", col, addCol, row, addRow); ++addCol;//++addCol; if ( row == 0) addRow = 1; p.drawText(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight, Qt::AlignHCenter | Qt::AlignVCenter, daylbls[i]); // reset color to actual color if (pDays.testBit(i)) { p.setPen(actcol); } // reset bold font to plain font if ( eDays.testBit(i)) { QFont myFont = font(); myFont.setBold(false); p.setFont(myFont); } } p.setPen(mDefaultTextColor); p.drawRect(0, 0, width(), height()); } else { //qDebug("NO redraw "); } bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,CopyROP); mRedrawNeeded = false; } // ---------------------------------------------------------------------------- // R E SI Z E E V E N T H A N D L I N G // ---------------------------------------------------------------------------- -void KODayMatrix::resizeEvent(QResizeEvent *) +void KODayMatrix::resizeEvent(QResizeEvent * e) { QRect sz = frameRect(); daysize.setHeight(sz.height()*7 / NUMDAYS); daysize.setWidth(sz.width() / 7); + QFrame::resizeEvent( e ); } QSize KODayMatrix::sizeHint() const { QFontMetrics fm ( font() ); int wid = fm.width( "30") *7+3; int hei = fm.height() * 6+3; //qDebug("KODayMatrix::sizeHint()********************* %d %d", wid , hei); return QSize ( wid, hei ); } |