summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp14
1 files changed, 3 insertions, 11 deletions
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());