summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Unidiff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp28
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)
119 // now, for a workaround... 119 // now, for a workaround...
120 // these two assignments fix the weird redraw bug 120 // these two assignments fix the weird redraw bug
121 mRedrawNeeded = true;
121 if ( mRedrawNeeded ) { 122 if ( mRedrawNeeded ) {
122 cx = contentsX() + 2; 123 cx = contentsX() + frameWidth()*2;
123 cw = contentsWidth() - 2; 124 cw = contentsWidth() ;
124 // end of workaround 125 // end of workaround
125 126
@@ -153,11 +154,11 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
153 timeHeight = fm.height(); 154 timeHeight = fm.height();
154 } 155 }
155 timeHeight -= (timeHeight/4-2); 156 //timeHeight -= (timeHeight/4-2);
156 QFont sFont = nFont; 157 QFont sFont = nFont;
157 sFont.setPointSize( sFont.pointSize()/2+2 ); 158 sFont.setPointSize( sFont.pointSize()/2+2 );
158 QFontMetrics fmS( sFont ); 159 QFontMetrics fmS( sFont );
159 int sHei = fmS.height(); 160 int sHei = fmS.height();
160 sHei -= (sHei/4-2); 161 //sHei -= (sHei/4-2);
161 int startW = this->width() - frameWidth(); 162 int startW = this->width() - frameWidth()-1;
162 while (y < cy + ch) { 163 while (y < cy + ch) {
163 p->drawLine(cx,y,cx+tW,y); 164 p->drawLine(cx,y,cx+tW,y);
@@ -174,12 +175,12 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
174 175
175 // center and draw the time label 176 // center and draw the time label
176 int timeWidth = fm.width(hour+"i"); 177 int timeWidth = fm.width(hour);
177 int tw2 = fm.width(suffix); 178 int tw2 = fm.width(suffix);
178 int offset = startW - timeWidth - tw2 ; 179 int offset = startW - timeWidth - tw2 ;
179 p->setFont( nFont ); 180 p->setFont( nFont );
180 p->drawText(cx - borderWidth + offset, y+ timeHeight, hour); 181 p->drawText( offset, y+ timeHeight, hour);
181 p->setFont( sFont ); 182 p->setFont( sFont );
182 offset = startW - tw2-1; 183 offset = startW - tw2+1;
183 p->drawText(cx - borderWidth + offset, y+ sHei, suffix); 184 p->drawText( offset, y+ sHei, suffix);
184 185
185 // increment indices 186 // increment indices
@@ -419,6 +420,5 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
419 if ( heibut > widebut ) 420 if ( heibut > widebut )
420 widebut = heibut ; 421 widebut = heibut ;
421 if ( QApplication::desktop()->width() < 480 ) 422
422 widebut = widebut*3/2;
423 //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, 423 //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed,
424 // QSizePolicy::Fixed ) ); 424 // QSizePolicy::Fixed ) );
@@ -718,5 +718,5 @@ void KOAgendaView::createDayLabels()
718 dayLabel = getNewDaylabel(); 718 dayLabel = getNewDaylabel();
719 } 719 }
720 dayLabel->setFixedWidth( mTimeLabels->width()+2 ); 720 dayLabel->setFixedWidth( mTimeLabels->width()+mAgenda->frameWidth() );
721 dayLabel->setFont( dlf ); 721 dayLabel->setFont( dlf );
722 dayLabel->setNum( -1 ); 722 dayLabel->setNum( -1 );
@@ -829,6 +829,6 @@ void KOAgendaView::createDayLabels()
829 } 829 }
830 //dayLabel->hide();//test only 830 //dayLabel->hide();//test only
831 831 qDebug("fremwidd %d ", mAgenda->frameWidth());
832 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ; 832 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()- (mAgenda->frameWidth()*2) ) % mSelectedDates.count() ;
833 if ( offset < 0 ) offset = 0; 833 if ( offset < 0 ) offset = 0;
834 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 ); 834 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 );