From 37175a31a8fa8772403e9588ff3f8bd7de3979cc Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 15 Jun 2005 09:19:15 +0000 Subject: fix --- diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 1be0aca..e660c32 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -135,7 +135,7 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) 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); @@ -405,8 +405,7 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) 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; diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h index 53658c0..d1b1940 100644 --- a/korganizer/koagendaitem.h +++ b/korganizer/koagendaitem.h @@ -122,6 +122,7 @@ class KOAgendaItem : public QWidget private: KOAgendaItemWhatsThis* mKOAgendaItemWhatsThis; bool mAllDay; + bool mWhiteText; int mCellX; int mCellXWidth; int mCellYTop,mCellYBottom; -- cgit v0.9.0.2