Diffstat (limited to 'korganizer/kdatenavigator.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/kdatenavigator.cpp | 11 |
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 @@ -117,4 +117,5 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) enableRollover(FollowMonth); mySizeHint = sizeHintTwoButtons(); + myFullSizeHint = sizeHintTwoButtons( 4 ); mFontChanged = false; } @@ -135,7 +136,11 @@ QFont KDateNavigator::yourFontHint( QSize si , bool *b) 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 "); @@ -158,9 +163,9 @@ QSize KDateNavigator::sizeHint() const 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; |