summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-21 09:40:04 (UTC)
committer zautrix <zautrix>2005-03-21 09:40:04 (UTC)
commitfd372d97084c401aacb999e89f8bdd94056a3b59 (patch) (unidiff)
tree8443519b847537711d6b423ef903ca132410a682
parentcd02f3880c5567a4bbb7b56e7034787005df7da8 (diff)
downloadkdepimpi-fd372d97084c401aacb999e89f8bdd94056a3b59.zip
kdepimpi-fd372d97084c401aacb999e89f8bdd94056a3b59.tar.gz
kdepimpi-fd372d97084c401aacb999e89f8bdd94056a3b59.tar.bz2
layout fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/navigatorbar.cpp22
-rw-r--r--korganizer/navigatorbar.h4
2 files changed, 26 insertions, 0 deletions
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index 4a51bba..e4abbf7 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -159,2 +159,21 @@ NavigatorBar::~NavigatorBar()
159} 159}
160QSize NavigatorBar::sizeHint() const
161{
162 int wid = mCurrentMinWid ;
163 if ( mPrevYear->isVisible() )
164 wid += mCurrentButtonMinWid;
165 if ( mPrevMonth->isVisible() )
166 wid += mCurrentButtonMinWid;
167 if ( mPrevWeek->isVisible() )
168 wid += mCurrentButtonMinWid;
169 if ( mNextMonth->isVisible() )
170 wid += mCurrentButtonMinWid;
171 if ( mNextWeek->isVisible() )
172 wid += mCurrentButtonMinWid;
173 if ( mNextYear->isVisible() )
174 wid += mCurrentButtonMinWid;
175 //qDebug("ret %d %d ", wid, mCurrentHei);
176 int add = 2;
177 return QSize ( wid+add, mCurrentHei+add );
178}
160void NavigatorBar::resetFont ( QFont fo ) 179void NavigatorBar::resetFont ( QFont fo )
@@ -187,2 +206,5 @@ void NavigatorBar::resetFont ( QFont fo )
187 mNextYear->setFixedHeight ( size ); 206 mNextYear->setFixedHeight ( size );
207 mCurrentHei = size;
208 mCurrentMinWid = maxwidth;
209 mCurrentButtonMinWid = mPrevYear->sizeHint().width()+2;
188} 210}
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index 0b2f60b..5d5aff4 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -42,2 +42,3 @@ class NavigatorBar: public QWidget
42 void resetFont ( QFont fo ); 42 void resetFont ( QFont fo );
43 QSize sizeHint() const;
43 44
@@ -57,2 +58,5 @@ class NavigatorBar: public QWidget
57 private: 58 private:
59 int mCurrentHei;
60 int mCurrentMinWid;
61 int mCurrentButtonMinWid;
58 QFrame *mCtrlFrame; 62 QFrame *mCtrlFrame;