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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index d450a97..6d1e6d5 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -140,33 +140,33 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
}
fm = QFontMetrics( nFont );
timeHeight = fm.ascent();
}
//timeHeight -= (timeHeight/4-2);
QFont sFont = nFont;
sFont.setPointSize( sFont.pointSize()/2 );
QFontMetrics fmS( sFont );
int sHei = fmS.ascent() ;
//sHei -= (sHei/4-2);
int startW = mMiniWidth - frameWidth()-2 ;
int tw2 = fmS.width(suffix);
timeHeight = (timeHeight-1) /2 -1;
//testline
//p->drawLine(0,0,0,contentsHeight());
while (y < cy + ch+mCellHeight) {
- p->drawLine(startW-tw2 ,y,cw+2,y);
+ p->drawLine(startW-tw2+1 ,y,cw+2,y);
hour.setNum(cell);
// handle 24h and am/pm time formats
if (KGlobal::locale()->use12Clock()) {
if (cell == 12) suffix = "pm";
if (cell == 0) hour.setNum(12);
if (cell > 12) hour.setNum(cell - 12);
}
// center and draw the time label
int timeWidth = fm.width(hour);
int offset = startW - timeWidth - tw2 -1 ;
p->setFont( nFont );
p->drawText( offset, y+ timeHeight, hour);
p->setFont( sFont );
offset = startW - tw2;
p->drawText( offset, y -1, suffix);
@@ -202,33 +202,33 @@ void TimeLabels::updateConfig()
test = "12";
mMiniWidth = fontMetrics().width(test);
if (KGlobal::locale()->use12Clock())
test = "pm";
else {
test = "00";
}
QFont sFont = font();
sFont.setPointSize( sFont.pointSize()/2 );
QFontMetrics fmS( sFont );
mMiniWidth += fmS.width( test ) + frameWidth()*2+4 ;
// update geometry restrictions based on new settings
setFixedWidth( mMiniWidth );
// update HourSize
mCellHeight = KOPrefs::instance()->mHourSize*4;
- resizeContents(50,mRows * mCellHeight);
+ resizeContents(mMiniWidth,mRows * mCellHeight+1);
}
/** update time label positions */
void TimeLabels::positionChanged()
{
int adjustment = mAgenda->contentsY();
setContentsPos(0, adjustment);
}
/** */
void TimeLabels::setAgenda(KOAgenda* agenda)
{
mAgenda = agenda;
}
void TimeLabels::contentsMousePressEvent ( QMouseEvent * e)