summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Unidiff
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)
130 int timeHeight = fm.height(); 130 int timeHeight = fm.height();
131 timeHeight -= (timeHeight/4-2); 131 timeHeight -= (timeHeight/4-2);
132 int borderWidth = 5; 132 int borderWidth = 2;
133 QFont nFont = p->font(); 133 QFont nFont = p->font();
134 QFont sFont = nFont; 134 QFont sFont = nFont;
@@ -180,13 +180,5 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
180int TimeLabels::minimumWidth() const 180int TimeLabels::minimumWidth() const
181{ 181{
182 QFontMetrics fm = fontMetrics(); 182 return mMiniWidth;
183
184 //TODO: calculate this value
185 int borderWidth = 4;
186
187 // the maximum width possible
188 int width = fm.width("88:88x") + borderWidth;
189
190 return width;
191} 183}
192 184
@@ -198,5 +190,5 @@ void TimeLabels::updateConfig()
198 // QFont font = config->readFontEntry("TimeBar Font"); 190 // QFont font = config->readFontEntry("TimeBar Font");
199 setFont(KOPrefs::instance()->mTimeBarFont); 191 setFont(KOPrefs::instance()->mTimeBarFont);
200 192 mMiniWidth = fontMetrics().width("88:88") + 2 ;
201 // update geometry restrictions based on new settings 193 // update geometry restrictions based on new settings
202 setFixedWidth(minimumWidth()); 194 setFixedWidth(minimumWidth());