author | zautrix <zautrix> | 2005-03-25 19:49:52 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-25 19:49:52 (UTC) |
commit | 4d93404e3453229e58c2ff9305beae131c9f1af9 (patch) (side-by-side diff) | |
tree | aa5a4664ba2de62fbfe8c43b23e906868da16e86 /korganizer | |
parent | ae440bf75e7f74f35f83d082de9c7a34d2d3c65d (diff) | |
download | kdepimpi-4d93404e3453229e58c2ff9305beae131c9f1af9.zip kdepimpi-4d93404e3453229e58c2ff9305beae131c9f1af9.tar.gz kdepimpi-4d93404e3453229e58c2ff9305beae131c9f1af9.tar.bz2 |
fix
-rw-r--r-- | korganizer/koagendaview.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index f287216..957ac52 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -119,34 +119,37 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) cx = contentsX() + 2; cw = contentsWidth() - 2; // end of workaround int cell = ((int)(cy/mCellHeight)); int y = cell * mCellHeight; QFontMetrics fm = fontMetrics(); QString hour; QString suffix; QString fullTime; int tW = fm.width("24:00i"); int timeHeight = fm.height(); - if ( timeHeight > mCellHeight ) - timeHeight = mCellHeight-1; + timeHeight -= (timeHeight/4-2); int borderWidth = 5; QFont nFont = p->font(); QFont sFont = nFont; sFont.setPointSize( sFont.pointSize()/2+2 ); if (!KGlobal::locale()->use12Clock()) suffix = "00"; QFontMetrics fmS( sFont ); int sHei = fmS.height(); + if ( timeHeight > mCellHeight ) { + timeHeight = mCellHeight-1; + sHei -= 2; + } while (y < cy + ch) { p->drawLine(cx,y,cx+tW,y); hour.setNum(cell); // handle 24h and am/pm time formats if (KGlobal::locale()->use12Clock()) { if (cell > 11) suffix = "pm"; else suffix = "am"; if (cell == 0) hour.setNum(12); if (cell > 12) hour.setNum(cell - 12); |