author | zautrix <zautrix> | 2005-06-15 09:06:25 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-15 09:06:25 (UTC) |
commit | 820a1285559d0bb5859f634ebc6865f3a85a93ab (patch) (side-by-side diff) | |
tree | 35278bfc95f131b4577d2f1d09c5915b5336e01a /korganizer | |
parent | c50dea673d7bf65614e042a0e3c0c53c73c705a0 (diff) | |
download | kdepimpi-820a1285559d0bb5859f634ebc6865f3a85a93ab.zip kdepimpi-820a1285559d0bb5859f634ebc6865f3a85a93ab.tar.gz kdepimpi-820a1285559d0bb5859f634ebc6865f3a85a93ab.tar.bz2 |
color fixes
-rw-r--r-- | korganizer/calendarview.cpp | 1 | ||||
-rw-r--r-- | korganizer/kotodoviewitem.cpp | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index dd4ea41..1338224 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -457,24 +457,25 @@ void CalendarView::init() // mDateNavigator->blockSignals( true ); //leftFrameLayout->addWidget( mDateNavigator ); mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) ); connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); + connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); mTodoList->setNavigator( mNavigator ); #if 0 if ( QApplication::desktop()->width() < 480 ) { leftFrameLayout->addWidget(mFilterView); leftFrameLayout->addWidget(mTodoList, 2 ); } else { leftFrameLayout->addWidget(mTodoList,2 ); leftFrameLayout->addWidget(mFilterView ); } #endif mFilterView->hide(); diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index f987b63..748f3e4 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -359,32 +359,35 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i { QColorGroup _cg = cg; QColorGroup::ColorRole role; if ( KOPrefs::instance()->mTodoViewUsesForegroundColor ) role = QColorGroup::Text; else role = QColorGroup::Base; //#ifndef KORG_NOLVALTERNATION if (isAlternate()) _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; QColor colorToSet; - if ( setColor ) { + if ( column == 0 && mTodo->calID() > 1 ) { + setColor = true; + colorToSet = KOPrefs::instance()->defaultColor( mTodo->calID() ); + } else if ( setColor ) { QStringList categories = mTodo->categories(); QString cat = categories.first(); if ( !cat.isEmpty()) { colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); } else setColor = false; - } + } bool openMode = !isOpen(); // maybe we are in flat-display-mode if ( !firstChild() ) openMode = false; bool colorRunning = mTodo->isRunning(); if ( ! colorRunning && openMode ) colorRunning = mTodo->hasRunningSub(); if ( colorRunning ) { setColor = true; colorToSet = KOPrefs::instance()->mTodoRunColor; } else { int odue = mTodo->hasDueSubTodo( openMode ); |