-rw-r--r-- | korganizer/kotodoviewitem.cpp | 7 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 29 |
2 files changed, 21 insertions, 15 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 70f00c6..6559119 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -361,14 +361,17 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i QString cat = categories.first(); if ( !cat.isEmpty()) { colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); } else setColor = false; } - - int odue = mTodo->hasDueSubTodo( !isOpen()); + bool openMode = !isOpen(); + // maybe we are in flat-display-mode + if ( !firstChild() ) + openMode = false; + int odue = mTodo->hasDueSubTodo( openMode ); if (odue == 2) { colorToSet = KOPrefs::instance()->mTodoOverdueColor; setColor = true; } else if ( odue == 1 ) { colorToSet = KOPrefs::instance()->mTodoDueTodayColor; setColor = true; diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 006a8dd..019f41f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -516,12 +516,25 @@ void MainWindow::initActions() selectFilterMenu = new QPopupMenu( this ); selectFilterMenu->setCheckable( true ); syncMenu = new QPopupMenu( this ); configureAgendaMenu = new QPopupMenu( this ); configureToolBarMenu = new QPopupMenu( this ); QPopupMenu *helpMenu = new QPopupMenu( this ); + + QIconSet icon; + int pixWid = 22, pixHei = 22; + QString pathString = ""; + if ( !p->mToolBarMiniIcons ) { + if ( QApplication::desktop()->width() < 480 ) { + pathString += "icons16/"; + pixWid = 18; pixHei = 16; + } + } else { + pathString += "iconsmini/"; + pixWid = 18; pixHei = 16; + } if ( KOPrefs::instance()->mShowFullMenu ) { QMenuBar *menuBar1; menuBar1 = menuBar(); menuBar1->insertItem( i18n("File"), importMenu ); menuBar1->insertItem( i18n("View"), viewMenu ); menuBar1->insertItem( i18n("Actions"), actionMenu ); @@ -536,13 +549,15 @@ void MainWindow::initActions() menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); menuBar1->insertItem( i18n("Help"), helpMenu ); } else { QPEMenuBar *menuBar1; menuBar1 = new QPEMenuBar( iconToolBar ); QPopupMenu *menuBar = new QPopupMenu( this ); - menuBar1->insertItem( i18n("ME"), menuBar); + icon = loadPixmap( pathString + "z_menu" ); + menuBar1->insertItem( icon.pixmap(), menuBar); + //menuBar1->insertItem( i18n("ME"), menuBar); menuBar->insertItem( i18n("File"), importMenu ); menuBar->insertItem( i18n("View"), viewMenu ); menuBar->insertItem( i18n("Actions"), actionMenu ); menuBar->insertItem( i18n("Synchronize"), syncMenu ); menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); @@ -550,24 +565,12 @@ void MainWindow::initActions() menuBar->insertItem( i18n("Help"), helpMenu ); //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); menuBar1->setMaximumSize( menuBar1->sizeHint( )); } connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); - QIconSet icon; - int pixWid = 22, pixHei = 22; - QString pathString = ""; - if ( !p->mToolBarMiniIcons ) { - if ( QApplication::desktop()->width() < 480 ) { - pathString += "icons16/"; - pixWid = 18; pixHei = 16; - } - } else { - pathString += "iconsmini/"; - pixWid = 18; pixHei = 16; - } mWeekBgColor = iconToolBar->backgroundColor(); mWeekPixmap.resize( pixWid , pixHei ); mWeekPixmap.fill( mWeekBgColor ); icon = mWeekPixmap; mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); if ( p-> mShowIconWeekNum ) |