-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 36 | ||||
-rw-r--r-- | korganizer/kdatenavigator.cpp | 1 |
2 files changed, 17 insertions, 20 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 27ba9e0..f6f62a4 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -200,50 +200,48 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() verticalCount = size().height() / minSize.height(); horizontalCount = size().width() / minSize.width(); if ( horizontalCount == 0 ) horizontalCount = 1; if ( verticalCount == 0 ) verticalCount = 1; fontchange = true; count = horizontalCount * verticalCount; - } else { - if ( mNavigatorView->fontChanged() ) { - fontchange = true; - fo = KOPrefs::instance()->mDateNavigatorFont; - mNavigatorView->changeFont( fo ); - mNavigatorView->unsetFontChanged(); - } - } - + } + mLastDisplayedDN = horizontalCount*verticalCount-1; while ( count > ( mExtraViews.count() + 1 ) ) { KDateNavigator *n = new KDateNavigator( this ); n->setMonthSignalOffset ( mExtraViews.count()+1 ); mExtraViews.append( n ); n->setCalendar( mCalendar ); connectNavigatorView( n ); // n->show(); } - setBaseDates(); - if ( fontchange ) { - //mNavigatorView->changeFont( fo ); - uint i; - for( i = 0; i < mExtraViews.count(); ++i ) { - KDateNavigator *view = mExtraViews.at( i ); - view->changeFont( fo ); - } - } mHorizontalCount = horizontalCount; mVerticalCount = verticalCount; } - + if ( !fontchange ) { + if ( mNavigatorView->fontChanged() ) { + fontchange = true; + fo = KOPrefs::instance()->mDateNavigatorFont; + mNavigatorView->changeFont( fo ); + mNavigatorView->unsetFontChanged(); + } + } + if ( fontchange ) { + uint i; + for( i = 0; i < mLastDisplayedDN; ++i ) { + KDateNavigator *view = mExtraViews.at( i ); + view->changeFont( fo ); + } + } int theight = height() / mVerticalCount; int twidth = width() / mHorizontalCount; NavigatorBar *bar = mNavigatorView->navigatorBar(); if ( mHorizontalCount > 1 ) bar->showButtons( true, false ); else bar->showButtons( true, true ); mNavigatorView->setGeometry(0, diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 2fca49e..1d09f40 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -56,17 +56,16 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) if (! startDate.isValid()) { qDebug("KDateNavigator::invalid startdate "); startDate = QDate::currentDate(); } mMonthSignalOffset = 0; mSelectedDates.append(startDate); m_MthYr = startDate; m_bShowWeekNums = true; - setFont( KOPrefs::instance()->mDateNavigatorFont ); mNavigatorBar = new NavigatorBar( startDate, this ); topLayout->addMultiCellWidget( mNavigatorBar, 0, 0, 0, 7 ); //mNavigatorBar->resize( 1,1); connect( mNavigatorBar, SIGNAL( goPrevYear() ), SIGNAL( goPrevYear() ) ); connect( mNavigatorBar, SIGNAL( goPrevMonth() ), SIGNAL( goPrevMonth() ) ); connect( mNavigatorBar, SIGNAL( goNextMonth() ), SIGNAL( goNextMonth() ) ); connect( mNavigatorBar, SIGNAL( goNextYear() ), SIGNAL( goNextYear() ) ); |