From ef825f1805452ba2cfb30cd7a41c392d3961f01e Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 26 Mar 2005 11:03:22 +0000 Subject: next rry --- (limited to 'korganizer/koagendaview.cpp') diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 957ac52..b9c7dec 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -129,7 +129,7 @@ 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); - int borderWidth = 5; + int borderWidth = 2; QFont nFont = p->font(); QFont sFont = nFont; sFont.setPointSize( sFont.pointSize()/2+2 ); @@ -179,15 +179,7 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) */ int TimeLabels::minimumWidth() const { - QFontMetrics fm = fontMetrics(); - - //TODO: calculate this value - int borderWidth = 4; - - // the maximum width possible - int width = fm.width("88:88x") + borderWidth; - - return width; + return mMiniWidth; } /** updates widget's internal state */ @@ -197,7 +189,7 @@ void TimeLabels::updateConfig() // config->setGroup("Fonts"); // QFont font = config->readFontEntry("TimeBar Font"); setFont(KOPrefs::instance()->mTimeBarFont); - + mMiniWidth = fontMetrics().width("88:88") + 2 ; // update geometry restrictions based on new settings setFixedWidth(minimumWidth()); -- cgit v0.9.0.2