summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-03-21 09:58:16 (UTC)
committer zautrix <zautrix>2005-03-21 09:58:16 (UTC)
commit5b9e0451514d65ab576b51e0f9d3515fa6b9e4e6 (patch) (unidiff)
treec3e1f114768876675b6ab6463083d03dff321b4e /korganizer
parentfd372d97084c401aacb999e89f8bdd94056a3b59 (diff)
downloadkdepimpi-5b9e0451514d65ab576b51e0f9d3515fa6b9e4e6.zip
kdepimpi-5b9e0451514d65ab576b51e0f9d3515fa6b9e4e6.tar.gz
kdepimpi-5b9e0451514d65ab576b51e0f9d3515fa6b9e4e6.tar.bz2
nf
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/datenavigatorcontainer.cpp4
-rw-r--r--korganizer/kdatenavigator.cpp14
-rw-r--r--korganizer/kdatenavigator.h1
-rw-r--r--korganizer/navigatorbar.cpp11
-rw-r--r--korganizer/navigatorbar.h1
5 files changed, 24 insertions, 7 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index 3358ecf..5cdaa83 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -161,5 +161,5 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
161 kdDebug(5850) << " MINIMUM SIZE: " << minimumSize() << endl; 161 kdDebug(5850) << " MINIMUM SIZE: " << minimumSize() << endl;
162#endif 162#endif
163 QSize minSize = mNavigatorView->yourSizeHint(); 163 QSize minSize = mNavigatorView->sizeHintTwoButtons();
164 164
165// kdDebug(5850) << " NAVIGATORVIEW minimumSizeHint: " << minSize << endl; 165// kdDebug(5850) << " NAVIGATORVIEW minimumSizeHint: " << minSize << endl;
@@ -180,5 +180,5 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
180 //if ( ! ok ) 180 //if ( ! ok )
181 // return; 181 // return;
182 minSize = mNavigatorView->sizeHint(); 182 minSize = mNavigatorView->sizeHintTwoButtons();
183 verticalCount = size().height() / minSize.height(); 183 verticalCount = size().height() / minSize.height();
184 horizontalCount = size().width() / minSize.width(); 184 horizontalCount = size().width() / minSize.width();
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)
135 mFontChanged = true; 135 mFontChanged = true;
136 mNavigatorBar->resetFont( fo ); 136 mNavigatorBar->resetFont( fo );
137 QSize sh = sizeHint(); 137 QSize sh = sizeHintTwoButtons();
138 //qDebug("fp %d %d %d %d %d", fontPoint, si.width() , sh.width() , si.height() , sh.height() ); 138 //qDebug("fp %d %d %d %d %d", fontPoint, si.width() , sh.width() , si.height() , sh.height() );
139 if ( si.width() > sh.width() && si.height() > sh.height()) { 139 if ( si.width() > sh.width() && si.height() > sh.height()) {
@@ -158,4 +158,16 @@ QSize KDateNavigator::sizeHint() const
158 return QSize ( wid, hei ); 158 return QSize ( wid, hei );
159} 159}
160QSize KDateNavigator::sizeHintTwoButtons() const
161{
162 QFontMetrics fm ( font() );
163 QSize day = daymatrix->sizeHint();
164 QSize nav = mNavigatorBar->sizeHintTwoButtons();
165 int wid = fm.width( "30") + day.width()+3;
166 int hei = fm.height() +day.height()+nav.height()+2;
167 if ( wid < nav.width() )
168 wid = nav.width() ;
169 //qDebug("KDateNavigator+++++++++++++ %d %d", wid , hei);
170 return QSize ( wid, hei );
171}
160void KDateNavigator::slotMonthSelected( int m ) 172void KDateNavigator::slotMonthSelected( int m )
161{ 173{
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 3177687..d1f32b6 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -71,4 +71,5 @@ class KDateNavigator: public QFrame
71 KODayMatrix *dayMatrix() { return daymatrix ;} 71 KODayMatrix *dayMatrix() { return daymatrix ;}
72 QSize sizeHint() const; 72 QSize sizeHint() const;
73 QSize sizeHintTwoButtons() const;
73 void changeFont ( QFont fo ); 74 void changeFont ( QFont fo );
74 public slots: 75 public slots:
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index e4abbf7..1b4ee52 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -174,6 +174,9 @@ QSize NavigatorBar::sizeHint() const
174 wid += mCurrentButtonMinWid; 174 wid += mCurrentButtonMinWid;
175 //qDebug("ret %d %d ", wid, mCurrentHei); 175 //qDebug("ret %d %d ", wid, mCurrentHei);
176 int add = 2; 176 return QSize ( wid, mCurrentHei );
177 return QSize ( wid+add, mCurrentHei+add ); 177}
178QSize NavigatorBar::sizeHintTwoButtons() const
179{
180 return QSize ( mCurrentMinWid + 2 * mCurrentButtonMinWid , mCurrentHei );
178} 181}
179void NavigatorBar::resetFont ( QFont fo ) 182void NavigatorBar::resetFont ( QFont fo )
@@ -205,6 +208,6 @@ void NavigatorBar::resetFont ( QFont fo )
205 mNextWeek->setFixedHeight( size ); 208 mNextWeek->setFixedHeight( size );
206 mNextYear->setFixedHeight ( size ); 209 mNextYear->setFixedHeight ( size );
207 mCurrentHei = size; 210 mCurrentHei = size +2;
208 mCurrentMinWid = maxwidth; 211 mCurrentMinWid = maxwidth+2;
209 mCurrentButtonMinWid = mPrevYear->sizeHint().width()+2; 212 mCurrentButtonMinWid = mPrevYear->sizeHint().width()+2;
210} 213}
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index 5d5aff4..bf6d173 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -42,4 +42,5 @@ class NavigatorBar: public QWidget
42 void resetFont ( QFont fo ); 42 void resetFont ( QFont fo );
43 QSize sizeHint() const; 43 QSize sizeHint() const;
44 QSize sizeHintTwoButtons() const;
44 45
45 public slots: 46 public slots: