summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (show 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
@@ -130,5 +130,5 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
int timeHeight = fm.height();
timeHeight -= (timeHeight/4-2);
- int borderWidth = 5;
+ int borderWidth = 2;
QFont nFont = p->font();
QFont sFont = nFont;
@@ -180,13 +180,5 @@ 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;
}
@@ -198,5 +190,5 @@ void TimeLabels::updateConfig()
// 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());