summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-27 10:47:39 (UTC)
committer zautrix <zautrix>2005-03-27 10:47:39 (UTC)
commit1800cf5f3af1f666dddcbfffe3171adcd467ae3d (patch) (side-by-side diff)
tree64b69e4bfbeacf5a036f027dd099c82c6c77e299
parentb170a7414ff72016285ea207caa7ccf786530e77 (diff)
downloadkdepimpi-1800cf5f3af1f666dddcbfffe3171adcd467ae3d.zip
kdepimpi-1800cf5f3af1f666dddcbfffe3171adcd467ae3d.tar.gz
kdepimpi-1800cf5f3af1f666dddcbfffe3171adcd467ae3d.tar.bz2
fixxx
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index fa6b951..18f242c 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -129,19 +129,31 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
int tW = fm.width("24:00i");
int timeHeight = fm.height();
- timeHeight -= (timeHeight/4-2);
+ //timeHeight -= (timeHeight/4-2);
int borderWidth = 0;
QFont nFont = p->font();
- QFont sFont = nFont;
- sFont.setPointSize( sFont.pointSize()/2+2 );
+
if (!KGlobal::locale()->use12Clock())
suffix = "00";
else
borderWidth = 0;
- QFontMetrics fmS( sFont );
- int sHei = fmS.height();
if ( timeHeight > mCellHeight ) {
timeHeight = mCellHeight-1;
- sHei -= 2;
+ int pointS = nFont.pointSize();
+ while ( pointS > 4 ) {
+ nFont.setPointSize( pointS );
+ fm = QFontMetrics( nFont );
+ if ( fm.height() < mCellHeight )
+ break;
+ -- pointS;
+ }
+ fm = QFontMetrics( nFont );
+ borderWidth = 4;
+ timeHeight = fm.height();
}
+ timeHeight -= (timeHeight/4-2);
+ QFont sFont = nFont;
+ sFont.setPointSize( sFont.pointSize()/2+2 );
+ QFontMetrics fmS( sFont );
+ int sHei = fmS.height();
while (y < cy + ch) {
@@ -890,4 +902,10 @@ void KOAgendaView::updateConfig()
if ( mBlockUpdating )
return;
+ if ( mAgenda->height() > 96 * KOPrefs::instance()->mHourSize ) {
+ int old = KOPrefs::instance()->mHourSize;
+ KOPrefs::instance()->mHourSize = mAgenda->height()/96 +1;
+ qDebug("KOPrefs::instance()->mHourSize adjusted %d to %d ", old,KOPrefs::instance()->mHourSize );
+ }
+
// update config for children