From 8c160d7aeeab1d22382ced11440712f6541a6db7 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 30 Mar 2005 13:46:29 +0000 Subject: fixes --- diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index f6f62a4..92abae6 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -164,7 +164,7 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() //return; if ( width() < 3 || height() < 3 ) return; - static int lastWid = 0; + static int lastWid = 0; static int lastHei = 0; if ( lastWid == width() && height() == lastHei ) { qDebug("KODNC: No layout computing needed. "); @@ -205,8 +205,14 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() 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 ); @@ -218,21 +224,25 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() } 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 ) { + if ( mNavigatorView->fontChanged() && ! fontchange ) { + qDebug("KDNC: Resetting all fonts "); + fo = KOPrefs::instance()->mDateNavigatorFont; + mNavigatorView->changeFont( fo ); + mNavigatorView->unsetFontChanged(); uint i; - for( i = 0; i < mLastDisplayedDN; ++i ) { + for( i = 0; i < mExtraViews.count(); ++i ) { KDateNavigator *view = mExtraViews.at( i ); view->changeFont( fo ); } -- cgit v0.9.0.2