-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 6 | ||||
-rw-r--r-- | korganizer/kdatenavigator.cpp | 2 | ||||
-rw-r--r-- | korganizer/kodaymatrix.cpp | 32 | ||||
-rw-r--r-- | korganizer/kodaymatrix.h | 1 |
4 files changed, 33 insertions, 8 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 92abae6..e57daa4 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -422,9 +422,13 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) //qDebug("NOT ResizeEnabled"); return; } else - mUpdateTimer->start( 250 ); +#ifdef DESKTOP_VERSION + mUpdateTimer->start( 100 ); +#else + mUpdateTimer->start( 50 ); +#endif //updateDayMatrixDates(); } diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 1d09f40..5aa1c9b 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -89,9 +89,9 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) // Create the weeknumber labels for( i = 0; i < 6; i++ ) { weeknos[i] = new QLabel(this); - weeknos[i]->setAlignment(AlignCenter); + weeknos[i]->setAlignment(AlignCenter ); //weeknos[i]->setFont(QFont("Arial", 10)); if(!m_bShowWeekNums) { weeknos[i]->hide(); } diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 8affe50..c7e1b45 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -108,17 +108,20 @@ KODayMatrix::KODayMatrix( QWidget *parent, const char *name ) #if 0 KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const char *name) : QFrame(parent, name) #endif -{ +{ + oldW = 0; + oldH = 0; + myPix.resize( 150, 120 ); mRedrawNeeded = true; mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this); mPendingUpdateBeforeRepaint = false; mouseDown = false; // initialize dynamic arrays bDays.resize ( NUMDAYS ); - hDays.resize ( NUMDAYS );; - eDays.resize ( NUMDAYS );; + hDays.resize ( NUMDAYS ); + eDays.resize ( NUMDAYS ); days = new QDate[NUMDAYS]; daylbls = new QString[NUMDAYS]; //events = new int[NUMDAYS]; mToolTip = new DynamicTip(this); @@ -333,9 +336,13 @@ void KODayMatrix::updateView() { updateView(startdate); } void KODayMatrix::repaintViewTimed() -{ +{ + mRedrawNeeded = true; + bDays.fill( false); + hDays.fill( false); + eDays.fill( false); mRepaintTimer->stop(); repaint(false); } void KODayMatrix::updateViewTimed() @@ -682,13 +689,25 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) if ( mPendingUpdateBeforeRepaint ) { updateViewTimed(); mPendingUpdateBeforeRepaint = false; } +#if 0 if ( myPix.width() != width() || myPix.height()!=height() ) { myPix.resize(size() ); mRedrawNeeded = true; } - +#endif + if ( oldW != width() || oldH !=height() ) + mRedrawNeeded = true; + + oldH = height() ; + oldW = width(); + if ( myPix.width() < width() || myPix.height() < height() ) { + myPix.resize(size() ); + mRedrawNeeded = true; + + } + if ( mRedrawNeeded ) { //qDebug("REDRAW "); QPainter p(&myPix); p.setFont(font()); @@ -946,9 +965,10 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) } } else { //qDebug("NO redraw "); } - bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); + + bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,CopyROP); mRedrawNeeded = false; } // ---------------------------------------------------------------------------- diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h index 731117c..d725ead 100644 --- a/korganizer/kodaymatrix.h +++ b/korganizer/kodaymatrix.h @@ -226,8 +226,9 @@ protected: void resizeEvent(QResizeEvent *); private: + int oldW, oldH; bool mRedrawNeeded; KODaymatrixWhatsThis* mKODaymatrixWhatsThis; bool mouseDown; QBitArray bDays; |