summaryrefslogtreecommitdiffabout
path: root/korganizer/datenavigatorcontainer.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/datenavigatorcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/datenavigatorcontainer.cpp13
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
@@ -46,4 +46,5 @@ DateNavigatorContainer::DateNavigatorContainer( QWidget *parent,
connectNavigatorView( mNavigatorView );
+ //setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
}
@@ -176,4 +177,6 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
//qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount );
bool fontchange = false;
+ if ( horizontalCount == 1)
+ horizontalCount = size().width() / mNavigatorView->yourFullSizeHint().width();
QFont fo;
if ( horizontalCount != mHorizontalCount ||
@@ -182,9 +185,14 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
if ( count == 0 ) {
bool ok;
- fo = mNavigatorView->yourFontHint( size() , &ok);
+ fo = mNavigatorView->yourFontHint( size() , &ok );
//mNavigatorView->resize( size() );
//if ( ! ok )
// return;
- minSize = mNavigatorView->sizeHintTwoButtons();
+ 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();
@@ -232,4 +240,5 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
mVerticalCount = verticalCount;
}
+ //qDebug("COUNT %d ", mExtraViews.count());
int height = size().height() / verticalCount;
int width = size().width() / horizontalCount;