author | zautrix <zautrix> | 2005-06-15 09:19:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-15 09:19:15 (UTC) |
commit | 37175a31a8fa8772403e9588ff3f8bd7de3979cc (patch) (side-by-side diff) | |
tree | d5e7210eaf5c0700e4957b898e01fb0f6dd73711 | |
parent | 820a1285559d0bb5859f634ebc6865f3a85a93ab (diff) | |
download | kdepimpi-37175a31a8fa8772403e9588ff3f8bd7de3979cc.zip kdepimpi-37175a31a8fa8772403e9588ff3f8bd7de3979cc.tar.gz kdepimpi-37175a31a8fa8772403e9588ff3f8bd7de3979cc.tar.bz2 |
fix
-rw-r--r-- | korganizer/koagendaitem.cpp | 5 | ||||
-rw-r--r-- | korganizer/koagendaitem.h | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 1be0aca..e660c32 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -134,9 +134,9 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) mColorGroup = QColorGroup( mBackgroundColor.light(), mBackgroundColor.dark(),mBackgroundColor.light(), mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ; setBackgroundColor( mBackgroundColor ); - + mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250); mConflictItems.clear(); setCellXY(0,0,1); setCellXWidth(0); setSubCell(0); @@ -404,10 +404,9 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) yy+= AGENDA_ICON_SIZE+2; h -=(AGENDA_ICON_SIZE+3); } } - int colsum = mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue(); - if ( colsum < 250 ) + if ( mWhiteText ) paint->setPen ( white); if ( x < 0 ) { w = w+x-3; x = 3; diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h index 53658c0..d1b1940 100644 --- a/korganizer/koagendaitem.h +++ b/korganizer/koagendaitem.h @@ -121,8 +121,9 @@ class KOAgendaItem : public QWidget private: KOAgendaItemWhatsThis* mKOAgendaItemWhatsThis; bool mAllDay; + bool mWhiteText; int mCellX; int mCellXWidth; int mCellYTop,mCellYBottom; int mSubCell; // subcell number of this item |