summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-30 13:46:29 (UTC)
committer zautrix <zautrix>2005-03-30 13:46:29 (UTC)
commit8c160d7aeeab1d22382ced11440712f6541a6db7 (patch) (side-by-side diff)
tree83fd0df6d30db6bbb05d82dc400d6f51823f5b3a
parent056f171723a9301aea5a65340dffeda34e078abf (diff)
downloadkdepimpi-8c160d7aeeab1d22382ced11440712f6541a6db7.zip
kdepimpi-8c160d7aeeab1d22382ced11440712f6541a6db7.tar.gz
kdepimpi-8c160d7aeeab1d22382ced11440712f6541a6db7.tar.bz2
fixes
Diffstat (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
@@ -192,60 +192,70 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates()
//if ( ! ok )
// return;
int butt = 2;
horizontalCount = size().width() / mNavigatorView->sizeHintTwoButtons( ).width();
if ( horizontalCount <= 1 )
minSize = mNavigatorView->sizeHintTwoButtons( 4 );
else
minSize = mNavigatorView->sizeHintTwoButtons();
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;
+ if ( mNavigatorView->fontChanged() && ! fontchange ) {
+ qDebug("KDNC: Resetting all fonts ");
fo = KOPrefs::instance()->mDateNavigatorFont;
mNavigatorView->changeFont( fo );
mNavigatorView->unsetFontChanged();
- }
- }
- if ( fontchange ) {
uint i;
- for( i = 0; i < mLastDisplayedDN; ++i ) {
+ for( i = 0; i < mExtraViews.count(); ++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,
0, twidth, theight );
for( uint i = 0; i < mLastDisplayedDN; ++i ) {
int x = ( i + 1 ) % mHorizontalCount;
int y = ( i + 1 ) / mHorizontalCount;