-rw-r--r-- | korganizer/koagendaitem.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index c055eb8..9fe1be4 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -191,13 +191,16 @@ void KOAgendaItem::recreateIncidence() bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) { int size = AGENDA_ICON_SIZE; int yOff = 0; int xOff = 0; - int x = pos().x() +3; + int x = pos().x(); + + if ( x < 0 ) x = 0; + x += 3; int y; if ( mAllDay ) y = pos().y()+3; else y = mCellYTop * ( height() / cellHeight() ) +3; @@ -211,13 +214,13 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) } else { ++yOff; ++y; } } - if (mIncidence->cancelled()) { + if (mIncidence->cancelled() && height() < 20 ) { int xpos = xOff*( 1 +AGENDA_ICON_SIZE )+x; int ypos = yOff*( 1 +AGENDA_ICON_SIZE)+y; p->drawLine( xpos, ypos, xpos+AGENDA_ICON_SIZE-1, ypos+AGENDA_ICON_SIZE-1 ); p->drawLine( xpos, ypos+AGENDA_ICON_SIZE-1, xpos+AGENDA_ICON_SIZE-1, ypos ); if ( horLayout ) ++xOff; @@ -430,12 +433,14 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) } if ( mWhiteText ) paint->setPen ( white); if ( x < 0 ) { w = w+x-3; x = 3; + if ( !horLayout && addIcon ) + x += AGENDA_ICON_SIZE+3; if ( w > parentWidget()->width() ){ w = parentWidget()->width() - 6; #ifndef DESKTOP_VERSION align = ( AlignHCenter|WordBreak|AlignTop); #else align = ( AlignHCenter|BreakAnywhere|WordBreak|AlignTop); |