-rw-r--r-- | korganizer/kodaymatrix.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index c55f7d7..5b5703f 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -856,49 +856,51 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) } else { mTodayPen.setColor(mHolidayColorShaded); } } //draw gray rectangle for today if in selection if (i >= mSelStartT && i <= mSelEndT) { QColor grey("grey"); mTodayPen.setColor(grey); } p.setPen(mTodayPen); int addCol = 0; int addRow = 0; if (rowModulo) { if ( row >= 6 - rowModulo ) addRow = row - 5 + rowModulo; } if ( colModulo ) { if ( col >= 7 - colModulo ) addCol = col - 6 + colModulo-1; } addCol += 1; - p.drawRect(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight+1); + if ( row == 0 ) + addRow = 1; + p.drawRect(col*dwidth+addCol, row*dheight+addRow, dwidth+1, dheight+1); p.setPen(tmppen); } // if any events are on that day then draw it using a bold font if ( eDays.testBit(i) ) { QFont myFont = font(); myFont.setBold(true); p.setFont(myFont); } // if it is a holiday then use the default holiday color if ( !mHolidays[i].isNull()) { if ( bDays.testBit(i) ) { if ( hDays.testBit(i) ) p.setPen(QColor(Qt::green)); else p.setPen(QColor(Qt::green).dark()); } else { if (actcol == mDefaultTextColor ) { p.setPen(KOPrefs::instance()->mHolidayColor); } else { p.setPen(mHolidayColorShaded); } } |