summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
authorzautrix <zautrix>2005-03-26 11:03:22 (UTC)
committer zautrix <zautrix>2005-03-26 11:03:22 (UTC)
commitef825f1805452ba2cfb30cd7a41c392d3961f01e (patch) (side-by-side diff)
tree60e896e2867bf3d90f0719f72c50add28bcf1d04 /korganizer/koagendaview.cpp
parent6427570041c902840fe0f557415a07bb7aa8c031 (diff)
downloadkdepimpi-ef825f1805452ba2cfb30cd7a41c392d3961f01e.zip
kdepimpi-ef825f1805452ba2cfb30cd7a41c392d3961f01e.tar.gz
kdepimpi-ef825f1805452ba2cfb30cd7a41c392d3961f01e.tar.bz2
next rry
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());