summaryrefslogtreecommitdiffabout
path: root/korganizer/kdatenavigator.cpp
authorzautrix <zautrix>2005-03-21 09:58:16 (UTC)
committer zautrix <zautrix>2005-03-21 09:58:16 (UTC)
commit5b9e0451514d65ab576b51e0f9d3515fa6b9e4e6 (patch) (side-by-side diff)
treec3e1f114768876675b6ab6463083d03dff321b4e /korganizer/kdatenavigator.cpp
parentfd372d97084c401aacb999e89f8bdd94056a3b59 (diff)
downloadkdepimpi-5b9e0451514d65ab576b51e0f9d3515fa6b9e4e6.zip
kdepimpi-5b9e0451514d65ab576b51e0f9d3515fa6b9e4e6.tar.gz
kdepimpi-5b9e0451514d65ab576b51e0f9d3515fa6b9e4e6.tar.bz2
nf
Diffstat (limited to 'korganizer/kdatenavigator.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kdatenavigator.cpp14
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
@@ -136,3 +136,3 @@ QFont KDateNavigator::yourFontHint( QSize si , bool *b)
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() );
@@ -159,2 +159,14 @@ QSize KDateNavigator::sizeHint() const
}
+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 )