summaryrefslogtreecommitdiffabout
path: root/korganizer/datenavigatorcontainer.cpp
Unidiff
Diffstat (limited to 'korganizer/datenavigatorcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/datenavigatorcontainer.cpp36
1 files changed, 32 insertions, 4 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index b9bd1b9..3358ecf 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -35,2 +35,3 @@
35#include "datenavigatorcontainer.h" 35#include "datenavigatorcontainer.h"
36#include "koprefs.h"
36 37
@@ -169,2 +170,4 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
169 //qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount ); 170 //qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount );
171 bool fontchange = false;
172 QFont fo;
170 if ( horizontalCount != mHorizontalCount || 173 if ( horizontalCount != mHorizontalCount ||
@@ -173,4 +176,23 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
173 if ( count == 0 ) { 176 if ( count == 0 ) {
174 mNavigatorView->resize( minSize ); 177 bool ok;
175 return; 178 fo = mNavigatorView->yourFontHint( size() , &ok);
179 //mNavigatorView->resize( size() );
180 //if ( ! ok )
181 // return;
182 minSize = mNavigatorView->sizeHint();
183 verticalCount = size().height() / minSize.height();
184 horizontalCount = size().width() / minSize.width();
185 if ( horizontalCount == 0 )
186 horizontalCount = 1;
187 if ( verticalCount == 0 )
188 verticalCount = 1;
189 fontchange = true;
190 count = horizontalCount * verticalCount;
191 } else {
192 if ( mNavigatorView->fontChanged() ) {
193 fontchange = true;
194 fo = KOPrefs::instance()->mDateNavigatorFont;
195 mNavigatorView->changeFont( fo );
196 mNavigatorView->unsetFontChanged();
197 }
176 } 198 }
@@ -190,3 +212,10 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
190 } 212 }
191 213 if ( fontchange ) {
214 //mNavigatorView->changeFont( fo );
215 uint i;
216 for( i = 0; i < mExtraViews.count(); ++i ) {
217 KDateNavigator *view = mExtraViews.at( i );
218 view->changeFont( fo );
219 }
220 }
192 mHorizontalCount = horizontalCount; 221 mHorizontalCount = horizontalCount;
@@ -194,3 +223,2 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
194 } 223 }
195
196 int height = size().height() / verticalCount; 224 int height = size().height() / verticalCount;