-rw-r--r-- | korganizer/koagendaitem.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index a42d07b..c055eb8 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -125,13 +125,13 @@ void KOAgendaItem::initColor () | |||
125 | } | 125 | } |
126 | 126 | ||
127 | } | 127 | } |
128 | 128 | ||
129 | QColor BackgroundColor ( mBackgroundColor ); | 129 | QColor BackgroundColor ( mBackgroundColor ); |
130 | if ( mIncidence->calID() > 1 ) { | 130 | if ( mIncidence->calID() > 1 ) { |
131 | BackgroundColor = KOPrefs::instance()->defaultColor( mIncidence->calID() ); | 131 | //BackgroundColor = KOPrefs::instance()->defaultColor( mIncidence->calID() ); |
132 | } | 132 | } |
133 | mColorGroup = QColorGroup( BackgroundColor.light(), | 133 | mColorGroup = QColorGroup( BackgroundColor.light(), |
134 | BackgroundColor.dark(),BackgroundColor.light(), | 134 | BackgroundColor.dark(),BackgroundColor.light(), |
135 | BackgroundColor.dark(),BackgroundColor, black, BackgroundColor) ; | 135 | BackgroundColor.dark(),BackgroundColor, black, BackgroundColor) ; |
136 | setBackgroundColor( mBackgroundColor ); | 136 | setBackgroundColor( mBackgroundColor ); |
137 | mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250); | 137 | mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250); |
@@ -197,12 +197,26 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) | |||
197 | int x = pos().x() +3; | 197 | int x = pos().x() +3; |
198 | int y; | 198 | int y; |
199 | if ( mAllDay ) | 199 | if ( mAllDay ) |
200 | y = pos().y()+3; | 200 | y = pos().y()+3; |
201 | else | 201 | else |
202 | y = mCellYTop * ( height() / cellHeight() ) +3; | 202 | y = mCellYTop * ( height() / cellHeight() ) +3; |
203 | |||
204 | |||
205 | if ( mIncidence->calID() > 1 ) { | ||
206 | p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, KOPrefs::instance()->defaultColor( mIncidence->calID() ) ); | ||
207 | p->drawRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x-1, yOff*( 1 +AGENDA_ICON_SIZE)+y-1, AGENDA_ICON_SIZE+2, AGENDA_ICON_SIZE+2 ); | ||
208 | if ( horLayout ){ | ||
209 | ++xOff; | ||
210 | ++x; | ||
211 | } | ||
212 | else { | ||
213 | ++yOff; | ||
214 | ++y; | ||
215 | } | ||
216 | } | ||
203 | if (mIncidence->cancelled()) { | 217 | if (mIncidence->cancelled()) { |
204 | int xpos = xOff*( 1 +AGENDA_ICON_SIZE )+x; | 218 | int xpos = xOff*( 1 +AGENDA_ICON_SIZE )+x; |
205 | int ypos = yOff*( 1 +AGENDA_ICON_SIZE)+y; | 219 | int ypos = yOff*( 1 +AGENDA_ICON_SIZE)+y; |
206 | p->drawLine( xpos, ypos, xpos+AGENDA_ICON_SIZE-1, ypos+AGENDA_ICON_SIZE-1 ); | 220 | p->drawLine( xpos, ypos, xpos+AGENDA_ICON_SIZE-1, ypos+AGENDA_ICON_SIZE-1 ); |
207 | p->drawLine( xpos, ypos+AGENDA_ICON_SIZE-1, xpos+AGENDA_ICON_SIZE-1, ypos ); | 221 | p->drawLine( xpos, ypos+AGENDA_ICON_SIZE-1, xpos+AGENDA_ICON_SIZE-1, ypos ); |
208 | if ( horLayout ) | 222 | if ( horLayout ) |