summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/datenavigatorcontainer.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index f6f62a4..92abae6 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -202,40 +202,50 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates()
202 if ( horizontalCount == 0 ) 202 if ( horizontalCount == 0 )
203 horizontalCount = 1; 203 horizontalCount = 1;
204 if ( verticalCount == 0 ) 204 if ( verticalCount == 0 )
205 verticalCount = 1; 205 verticalCount = 1;
206 fontchange = true; 206 fontchange = true;
207 count = horizontalCount * verticalCount; 207 count = horizontalCount * verticalCount;
208 } else {
209 if ( mNavigatorView->fontChanged() ) {
210 fontchange = true;
211 fo = KOPrefs::instance()->mDateNavigatorFont;
212 mNavigatorView->changeFont( fo );
213 mNavigatorView->unsetFontChanged();
214 }
208 } 215 }
209
210 mLastDisplayedDN = horizontalCount*verticalCount-1; 216 mLastDisplayedDN = horizontalCount*verticalCount-1;
211 while ( count > ( mExtraViews.count() + 1 ) ) { 217 while ( count > ( mExtraViews.count() + 1 ) ) {
212 KDateNavigator *n = new KDateNavigator( this ); 218 KDateNavigator *n = new KDateNavigator( this );
213 n->setMonthSignalOffset ( mExtraViews.count()+1 ); 219 n->setMonthSignalOffset ( mExtraViews.count()+1 );
214 mExtraViews.append( n ); 220 mExtraViews.append( n );
215 n->setCalendar( mCalendar ); 221 n->setCalendar( mCalendar );
216 connectNavigatorView( n ); 222 connectNavigatorView( n );
217 // n->show(); 223 // n->show();
218 } 224 }
219 225
220 setBaseDates(); 226 setBaseDates();
227 if ( fontchange ) {
228 //mNavigatorView->changeFont( fo );
229 uint i;
230 for( i = 0; i < mExtraViews.count(); ++i ) {
231 KDateNavigator *view = mExtraViews.at( i );
232 view->changeFont( fo );
233 }
234 }
221 mHorizontalCount = horizontalCount; 235 mHorizontalCount = horizontalCount;
222 mVerticalCount = verticalCount; 236 mVerticalCount = verticalCount;
223 237
224 } 238 }
225 if ( !fontchange ) { 239 if ( mNavigatorView->fontChanged() && ! fontchange ) {
226 if ( mNavigatorView->fontChanged() ) { 240 qDebug("KDNC: Resetting all fonts ");
227 fontchange = true;
228 fo = KOPrefs::instance()->mDateNavigatorFont; 241 fo = KOPrefs::instance()->mDateNavigatorFont;
229 mNavigatorView->changeFont( fo ); 242 mNavigatorView->changeFont( fo );
230 mNavigatorView->unsetFontChanged(); 243 mNavigatorView->unsetFontChanged();
231 }
232 }
233 if ( fontchange ) {
234 uint i; 244 uint i;
235 for( i = 0; i < mLastDisplayedDN; ++i ) { 245 for( i = 0; i < mExtraViews.count(); ++i ) {
236 KDateNavigator *view = mExtraViews.at( i ); 246 KDateNavigator *view = mExtraViews.at( i );
237 view->changeFont( fo ); 247 view->changeFont( fo );
238 } 248 }
239 } 249 }
240 int theight = height() / mVerticalCount; 250 int theight = height() / mVerticalCount;
241 int twidth = width() / mHorizontalCount; 251 int twidth = width() / mHorizontalCount;