Diffstat (limited to 'korganizer/kdatenavigator.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/kdatenavigator.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 92a0ac2..a5dbc5d 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -135,5 +135,5 @@ QFont KDateNavigator::yourFontHint( QSize si , bool *b) mFontChanged = true; mNavigatorBar->resetFont( fo ); - QSize sh = sizeHint(); + QSize sh = sizeHintTwoButtons(); //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()) { @@ -158,4 +158,16 @@ QSize KDateNavigator::sizeHint() const return QSize ( wid, hei ); } +QSize KDateNavigator::sizeHintTwoButtons() const +{ + QFontMetrics fm ( font() ); + QSize day = daymatrix->sizeHint(); + QSize nav = mNavigatorBar->sizeHintTwoButtons(); + int wid = fm.width( "30") + day.width()+3; + int hei = fm.height() +day.height()+nav.height()+2; + if ( wid < nav.width() ) + wid = nav.width() ; + //qDebug("KDateNavigator+++++++++++++ %d %d", wid , hei); + return QSize ( wid, hei ); +} void KDateNavigator::slotMonthSelected( int m ) { |