From ad66f0fe56bb88104fb0065ccb599ab0edd35cf4 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 03 Jul 2005 20:25:46 +0000 Subject: icon agenda fix --- (limited to 'korganizer/koagendaitem.cpp') diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index c055eb8..9fe1be4 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -194,7 +194,10 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) 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; @@ -214,7 +217,7 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) ++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 ); @@ -433,6 +436,8 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) 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 -- cgit v0.9.0.2