author | zautrix <zautrix> | 2005-03-21 09:58:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-21 09:58:16 (UTC) |
commit | 5b9e0451514d65ab576b51e0f9d3515fa6b9e4e6 (patch) (unidiff) | |
tree | c3e1f114768876675b6ab6463083d03dff321b4e /korganizer/kdatenavigator.cpp | |
parent | fd372d97084c401aacb999e89f8bdd94056a3b59 (diff) | |
download | kdepimpi-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.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 | |||
@@ -133,9 +133,9 @@ QFont KDateNavigator::yourFontHint( QSize si , bool *b) | |||
133 | fo.setPointSize( fontPoint ); | 133 | fo.setPointSize( fontPoint ); |
134 | setFont( fo ); | 134 | setFont( fo ); |
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()) { |
140 | *b = true; | 140 | *b = true; |
141 | //qDebug("fooooooooooooooooooooooouuuuund "); | 141 | //qDebug("fooooooooooooooooooooooouuuuund "); |
@@ -156,8 +156,20 @@ QSize KDateNavigator::sizeHint() const | |||
156 | wid = nav.width() ; | 156 | wid = nav.width() ; |
157 | //qDebug("KDateNavigator+++++++++++++ %d %d", wid , hei); | 157 | //qDebug("KDateNavigator+++++++++++++ %d %d", wid , hei); |
158 | return QSize ( wid, hei ); | 158 | return QSize ( wid, hei ); |
159 | } | 159 | } |
160 | QSize 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 | } | ||
160 | void KDateNavigator::slotMonthSelected( int m ) | 172 | void KDateNavigator::slotMonthSelected( int m ) |
161 | { | 173 | { |
162 | if ( m_MthYr.month() <= mMonthSignalOffset) | 174 | if ( m_MthYr.month() <= mMonthSignalOffset) |
163 | m += 12; | 175 | m += 12; |