-rw-r--r-- | korganizer/koagendaview.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 218396d..072d464 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -119,7 +119,8 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) // now, for a workaround... // these two assignments fix the weird redraw bug + mRedrawNeeded = true; if ( mRedrawNeeded ) { - cx = contentsX() + 2; - cw = contentsWidth() - 2; + cx = contentsX() + frameWidth()*2; + cw = contentsWidth() ; // end of workaround @@ -153,11 +154,11 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) timeHeight = fm.height(); } - timeHeight -= (timeHeight/4-2); + //timeHeight -= (timeHeight/4-2); QFont sFont = nFont; sFont.setPointSize( sFont.pointSize()/2+2 ); QFontMetrics fmS( sFont ); int sHei = fmS.height(); - sHei -= (sHei/4-2); - int startW = this->width() - frameWidth(); + //sHei -= (sHei/4-2); + int startW = this->width() - frameWidth()-1; while (y < cy + ch) { p->drawLine(cx,y,cx+tW,y); @@ -174,12 +175,12 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) // center and draw the time label - int timeWidth = fm.width(hour+"i"); + int timeWidth = fm.width(hour); int tw2 = fm.width(suffix); int offset = startW - timeWidth - tw2 ; p->setFont( nFont ); - p->drawText(cx - borderWidth + offset, y+ timeHeight, hour); + p->drawText( offset, y+ timeHeight, hour); p->setFont( sFont ); - offset = startW - tw2-1; - p->drawText(cx - borderWidth + offset, y+ sHei, suffix); + offset = startW - tw2+1; + p->drawText( offset, y+ sHei, suffix); // increment indices @@ -419,6 +420,5 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : if ( heibut > widebut ) widebut = heibut ; - if ( QApplication::desktop()->width() < 480 ) - widebut = widebut*3/2; + //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, // QSizePolicy::Fixed ) ); @@ -718,5 +718,5 @@ void KOAgendaView::createDayLabels() dayLabel = getNewDaylabel(); } - dayLabel->setFixedWidth( mTimeLabels->width()+2 ); + dayLabel->setFixedWidth( mTimeLabels->width()+mAgenda->frameWidth() ); dayLabel->setFont( dlf ); dayLabel->setNum( -1 ); @@ -829,6 +829,6 @@ void KOAgendaView::createDayLabels() } //dayLabel->hide();//test only - - int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ; + qDebug("fremwidd %d ", mAgenda->frameWidth()); + int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()- (mAgenda->frameWidth()*2) ) % mSelectedDates.count() ; if ( offset < 0 ) offset = 0; //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 ); |