-rw-r--r-- | korganizer/komonthview.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index ddac6e4..3aaa50a 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -221,13 +221,14 @@ void MonthViewItem::paint(QPainter *p) | |||
221 | } | 221 | } |
222 | int x = 1; | 222 | int x = 1; |
223 | //int y = 3;//(height() - mRecurPixmap.height()) /2; | 223 | //int y = 3;//(height() - mRecurPixmap.height()) /2; |
224 | int size = PIXMAP_SIZE; | 224 | int size = PIXMAP_SIZE; |
225 | if ( QApplication::desktop()->width() < 300 ) | 225 | if ( QApplication::desktop()->width() < 300 ) |
226 | size = 3; | 226 | size = 3; |
227 | int y = (height( listBox () ) - size -1 ) /2; | 227 | int heihei = height( listBox () ); |
228 | int y = (heihei - size -1 ) /2; | ||
228 | 229 | ||
229 | if ( KOPrefs::instance()->mMonthShowIcons ) { | 230 | if ( KOPrefs::instance()->mMonthShowIcons ) { |
230 | if ( mInfo ) { | 231 | if ( mInfo ) { |
231 | p->fillRect ( x, y,size,size, Qt::darkGreen ); | 232 | p->fillRect ( x, y,size,size, Qt::darkGreen ); |
232 | x += size + 1; | 233 | x += size + 1; |
233 | } | 234 | } |
@@ -285,13 +286,13 @@ void MonthViewItem::paint(QPainter *p) | |||
285 | yPos = pmheight/2 - fm.height()/2 + fm.ascent(); | 286 | yPos = pmheight/2 - fm.height()/2 + fm.ascent(); |
286 | p->setPen( palette().color( QPalette::Normal, sel ? \ | 287 | p->setPen( palette().color( QPalette::Normal, sel ? \ |
287 | QColorGroup::HighlightedText : QColorGroup::Foreground ) ); | 288 | QColorGroup::HighlightedText : QColorGroup::Foreground ) ); |
288 | p->drawText( x, yPos, text() ); | 289 | p->drawText( x, yPos, text() ); |
289 | if ( mIncidence->cancelled() ) { | 290 | if ( mIncidence->cancelled() ) { |
290 | int wid = fm.width( text() ); | 291 | int wid = fm.width( text() ); |
291 | p->drawLine( x, yPos- fm.height()/2+3,x+wid, yPos- fm.height()/2 +3); | 292 | p->drawLine( x, heihei/2 ,x+wid, heihei/2 ); |
292 | } | 293 | } |
293 | 294 | ||
294 | } | 295 | } |
295 | 296 | ||
296 | int MonthViewItem::height(const QListBox *lb) const | 297 | int MonthViewItem::height(const QListBox *lb) const |
297 | { | 298 | { |