author | zautrix <zautrix> | 2005-03-22 09:31:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-22 09:31:41 (UTC) |
commit | d18536f758f4cf64d5c59d7a7c814e6ff12f9a3d (patch) (side-by-side diff) | |
tree | 326186e1a65db5a9ba174fa2bdbd3dffc7f23b9f /korganizer/kdatenavigator.cpp | |
parent | 8888389a4511e0bda23774b993dcfdeb7f837c31 (diff) | |
download | kdepimpi-d18536f758f4cf64d5c59d7a7c814e6ff12f9a3d.zip kdepimpi-d18536f758f4cf64d5c59d7a7c814e6ff12f9a3d.tar.gz kdepimpi-d18536f758f4cf64d5c59d7a7c814e6ff12f9a3d.tar.bz2 |
layout fixes
-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 @@ -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() ) |