summaryrefslogtreecommitdiffabout
path: root/korganizer/kdatenavigator.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kdatenavigator.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kdatenavigator.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index fe83e09..231095f 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -116,6 +116,7 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
updateConfig();
enableRollover(FollowMonth);
mySizeHint = sizeHintTwoButtons();
+ myFullSizeHint = sizeHintTwoButtons( 4 );
mFontChanged = false;
}
void KDateNavigator::changeFont ( QFont fo )
@@ -134,9 +135,13 @@ QFont KDateNavigator::yourFontHint( QSize si , bool *b)
setFont( fo );
mFontChanged = true;
mNavigatorBar->resetFont( fo );
- QSize sh = sizeHintTwoButtons();
+ QSize sh = sizeHintTwoButtons( 2 );
//qDebug("fp %d %d %d %d %d", fontPoint, si.width() , sh.width() , si.height() , sh.height() );
if ( si.width() > sh.width() && si.height() > sh.height()) {
+ if ( si.width() / sh.width() == 1 ) {
+ if ( si.width() < sizeHintTwoButtons( 4 ).width())
+ continue;
+ }
*b = true;
//qDebug("fooooooooooooooooooooooouuuuund ");
break;
@@ -157,11 +162,11 @@ QSize KDateNavigator::sizeHint() const
//qDebug("KDateNavigator+++++++++++++ %d %d", wid , hei);
return QSize ( wid, hei );
}
-QSize KDateNavigator::sizeHintTwoButtons() const
+QSize KDateNavigator::sizeHintTwoButtons( int butnum ) const
{
QFontMetrics fm ( font() );
QSize day = daymatrix->sizeHint();
- QSize nav = mNavigatorBar->sizeHintTwoButtons();
+ QSize nav = mNavigatorBar->sizeHintTwoButtons( butnum );
int wid = fm.width( "30") + day.width()+3;
int hei = fm.height() +day.height()+nav.height()+2;
if ( wid < nav.width() )