author | zautrix <zautrix> | 2005-03-22 09:31:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-22 09:31:41 (UTC) |
commit | d18536f758f4cf64d5c59d7a7c814e6ff12f9a3d (patch) (unidiff) | |
tree | 326186e1a65db5a9ba174fa2bdbd3dffc7f23b9f /korganizer/datenavigatorcontainer.cpp | |
parent | 8888389a4511e0bda23774b993dcfdeb7f837c31 (diff) | |
download | kdepimpi-d18536f758f4cf64d5c59d7a7c814e6ff12f9a3d.zip kdepimpi-d18536f758f4cf64d5c59d7a7c814e6ff12f9a3d.tar.gz kdepimpi-d18536f758f4cf64d5c59d7a7c814e6ff12f9a3d.tar.bz2 |
layout fixes
Diffstat (limited to 'korganizer/datenavigatorcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index b147427..ab0dd50 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp | |||
@@ -45,6 +45,7 @@ DateNavigatorContainer::DateNavigatorContainer( QWidget *parent, | |||
45 | mNavigatorView = new KDateNavigator( this, name ); | 45 | mNavigatorView = new KDateNavigator( this, name ); |
46 | 46 | ||
47 | connectNavigatorView( mNavigatorView ); | 47 | connectNavigatorView( mNavigatorView ); |
48 | //setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); | ||
48 | } | 49 | } |
49 | 50 | ||
50 | DateNavigatorContainer::~DateNavigatorContainer() | 51 | DateNavigatorContainer::~DateNavigatorContainer() |
@@ -175,17 +176,24 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) | |||
175 | //qDebug(" wattdatt %d new %d %d ", size().width() ,e->size().width() , minSize.width() ); | 176 | //qDebug(" wattdatt %d new %d %d ", size().width() ,e->size().width() , minSize.width() ); |
176 | //qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount ); | 177 | //qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount ); |
177 | bool fontchange = false; | 178 | bool fontchange = false; |
179 | if ( horizontalCount == 1) | ||
180 | horizontalCount = size().width() / mNavigatorView->yourFullSizeHint().width(); | ||
178 | QFont fo; | 181 | QFont fo; |
179 | if ( horizontalCount != mHorizontalCount || | 182 | if ( horizontalCount != mHorizontalCount || |
180 | verticalCount != mVerticalCount ) { | 183 | verticalCount != mVerticalCount ) { |
181 | uint count = horizontalCount * verticalCount; | 184 | uint count = horizontalCount * verticalCount; |
182 | if ( count == 0 ) { | 185 | if ( count == 0 ) { |
183 | bool ok; | 186 | bool ok; |
184 | fo = mNavigatorView->yourFontHint( size() , &ok); | 187 | fo = mNavigatorView->yourFontHint( size() , &ok ); |
185 | //mNavigatorView->resize( size() ); | 188 | //mNavigatorView->resize( size() ); |
186 | //if ( ! ok ) | 189 | //if ( ! ok ) |
187 | // return; | 190 | // return; |
188 | minSize = mNavigatorView->sizeHintTwoButtons(); | 191 | int butt = 2; |
192 | horizontalCount = size().width() / mNavigatorView->sizeHintTwoButtons( ).width(); | ||
193 | if ( horizontalCount <= 1 ) | ||
194 | minSize = mNavigatorView->sizeHintTwoButtons( 4 ); | ||
195 | else | ||
196 | minSize = mNavigatorView->sizeHintTwoButtons(); | ||
189 | verticalCount = size().height() / minSize.height(); | 197 | verticalCount = size().height() / minSize.height(); |
190 | horizontalCount = size().width() / minSize.width(); | 198 | horizontalCount = size().width() / minSize.width(); |
191 | if ( horizontalCount == 0 ) | 199 | if ( horizontalCount == 0 ) |
@@ -231,6 +239,7 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) | |||
231 | mHorizontalCount = horizontalCount; | 239 | mHorizontalCount = horizontalCount; |
232 | mVerticalCount = verticalCount; | 240 | mVerticalCount = verticalCount; |
233 | } | 241 | } |
242 | //qDebug("COUNT %d ", mExtraViews.count()); | ||
234 | int height = size().height() / verticalCount; | 243 | int height = size().height() / verticalCount; |
235 | int width = size().width() / horizontalCount; | 244 | int width = size().width() / horizontalCount; |
236 | 245 | ||