author | zautrix <zautrix> | 2005-04-01 19:24:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-01 19:24:18 (UTC) |
commit | b1e3bf53b1c4cc46ef0a2ded04338bc38a640161 (patch) (side-by-side diff) | |
tree | 7f6aecc33d464e28d18e07b0663450e917ea594b /korganizer | |
parent | 1022d8763a5185c74d1fb1fba9857d6e3afd9ff5 (diff) | |
download | kdepimpi-b1e3bf53b1c4cc46ef0a2ded04338bc38a640161.zip kdepimpi-b1e3bf53b1c4cc46ef0a2ded04338bc38a640161.tar.gz kdepimpi-b1e3bf53b1c4cc46ef0a2ded04338bc38a640161.tar.bz2 |
fix
-rw-r--r-- | korganizer/koagendaview.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 99f547a..667ff2a 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -151,13 +151,13 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) //timeHeight -= (timeHeight/4-2); QFont sFont = nFont; sFont.setPointSize( sFont.pointSize()/2 ); QFontMetrics fmS( sFont ); int sHei = fmS.ascent() ; //sHei -= (sHei/4-2); - int startW = this->width() - 2*frameWidth()-1; + int startW = this->width() - frameWidth()-2; int tw2 = fmS.width(suffix); while (y < cy + ch) { p->drawLine(cx,y,cw,y); hour.setNum(cell); // handle 24h and am/pm time formats @@ -204,16 +204,24 @@ void TimeLabels::updateConfig() { mRedrawNeeded = true; // set the font // config->setGroup("Fonts"); // QFont font = config->readFontEntry("TimeBar Font"); setFont(KOPrefs::instance()->mTimeBarFont); - QString test = "20oo"; + QString test = "20"; if (KGlobal::locale()->use12Clock()) - test = "12mi"; - mMiniWidth = fontMetrics().width(test) + frameWidth()*2 +1 ; + test = "12"; + mMiniWidth = fontMetrics().width(test); + if (KGlobal::locale()->use12Clock()) + test = "pm"; + else + test = "00"; + QFont sFont = font(); + sFont.setPointSize( sFont.pointSize()/2 ); + QFontMetrics fmS( sFont ); + mMiniWidth += fmS.width( test ) + frameWidth()*2 +4 ; // update geometry restrictions based on new settings setFixedWidth( mMiniWidth ); // update HourSize mCellHeight = KOPrefs::instance()->mHourSize*4; resizeContents(50,mRows * mCellHeight); |