summaryrefslogtreecommitdiffabout
path: root/korganizer/kodaymatrix.cpp
authorzautrix <zautrix>2005-02-01 08:44:35 (UTC)
committer zautrix <zautrix>2005-02-01 08:44:35 (UTC)
commit00b559c52051c05d6df41724b207a038c0e548bf (patch) (side-by-side diff)
treee48f4ef8d51a99e54ba713a8f8f9845b3db5c741 /korganizer/kodaymatrix.cpp
parent74c59cea6db3e3a1c0a5922f7fa12ada24f4672b (diff)
downloadkdepimpi-00b559c52051c05d6df41724b207a038c0e548bf.zip
kdepimpi-00b559c52051c05d6df41724b207a038c0e548bf.tar.gz
kdepimpi-00b559c52051c05d6df41724b207a038c0e548bf.tar.bz2
two font fixes
Diffstat (limited to 'korganizer/kodaymatrix.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kodaymatrix.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 549ef2a..dd83d48 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -469,48 +469,49 @@ void KODayMatrix::dropEvent(QDropEvent *e)
emit eventDropped(event);
} else {
// kdDebug() << "KODayMatrix::dropEvent(): Event from drop not decodable" << endl;
e->ignore();
}
#endif
}
// ----------------------------------------------------------------------------
// P A I N T E V E N T H A N D L I N G
// ----------------------------------------------------------------------------
void KODayMatrix::paintEvent(QPaintEvent * pevent)
{
if ( width() <= 0 || height() <= 0 )
return;
if ( mPendingUpdateBeforeRepaint ) {
updateViewTimed();
mPendingUpdateBeforeRepaint = false;
}
if ( myPix.width() != width() || myPix.height()!=height() ) {
myPix.resize(size() );
}
QPainter p(&myPix);
+ p.setFont(font());
QRect sz = frameRect();
int dheight = daysize.height();
int dwidth = daysize.width();
int row,col;
int selw, selh;
bool isRTL = KOGlobals::self()->reverseLayout();
// draw background and topleft frame
p.fillRect(pevent->rect(), mDefaultBackColor);
p.setPen(mDefaultTextColor);
p.drawRect(0, 0, sz.width()+1, sz.height()+1);
// draw selected days with highlighted background color
if (mSelStart != NOSELECTION) {
row = mSelStart/7;
col = mSelStart -row*7;
QColor selcol = KOPrefs::instance()->mHighlightColor;
if (row == mSelEnd/7) {
// Single row selection
p.fillRect(isRTL ? (7 - (mSelEnd-mSelStart+1) - col)*dwidth : col*dwidth,
row*dheight, (mSelEnd-mSelStart+1)*dwidth, dheight, selcol);