summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/datenavigatorcontainer.cpp6
-rw-r--r--korganizer/kdatenavigator.cpp2
-rw-r--r--korganizer/kodaymatrix.cpp32
-rw-r--r--korganizer/kodaymatrix.h1
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
@@ -423,7 +423,11 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
423 return; 423 return;
424 } 424 }
425 else 425 else
426 mUpdateTimer->start( 250 ); 426#ifdef DESKTOP_VERSION
427 mUpdateTimer->start( 100 );
428#else
429 mUpdateTimer->start( 50 );
430#endif
427 431
428 //updateDayMatrixDates(); 432 //updateDayMatrixDates();
429} 433}
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 1d09f40..5aa1c9b 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -90,7 +90,7 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
90 // Create the weeknumber labels 90 // Create the weeknumber labels
91 for( i = 0; i < 6; i++ ) { 91 for( i = 0; i < 6; i++ ) {
92 weeknos[i] = new QLabel(this); 92 weeknos[i] = new QLabel(this);
93 weeknos[i]->setAlignment(AlignCenter); 93 weeknos[i]->setAlignment(AlignCenter );
94 //weeknos[i]->setFont(QFont("Arial", 10)); 94 //weeknos[i]->setFont(QFont("Arial", 10));
95 if(!m_bShowWeekNums) { 95 if(!m_bShowWeekNums) {
96 weeknos[i]->hide(); 96 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
@@ -109,15 +109,18 @@ KODayMatrix::KODayMatrix( QWidget *parent, const char *name )
109KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const char *name) : 109KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const char *name) :
110 QFrame(parent, name) 110 QFrame(parent, name)
111#endif 111#endif
112{ 112{
113 oldW = 0;
114 oldH = 0;
115 myPix.resize( 150, 120 );
113 mRedrawNeeded = true; 116 mRedrawNeeded = true;
114 mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this); 117 mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this);
115 mPendingUpdateBeforeRepaint = false; 118 mPendingUpdateBeforeRepaint = false;
116 mouseDown = false; 119 mouseDown = false;
117 // initialize dynamic arrays 120 // initialize dynamic arrays
118 bDays.resize ( NUMDAYS ); 121 bDays.resize ( NUMDAYS );
119 hDays.resize ( NUMDAYS );; 122 hDays.resize ( NUMDAYS );
120 eDays.resize ( NUMDAYS );; 123 eDays.resize ( NUMDAYS );
121 days = new QDate[NUMDAYS]; 124 days = new QDate[NUMDAYS];
122 daylbls = new QString[NUMDAYS]; 125 daylbls = new QString[NUMDAYS];
123 //events = new int[NUMDAYS]; 126 //events = new int[NUMDAYS];
@@ -334,7 +337,11 @@ void KODayMatrix::updateView()
334 updateView(startdate); 337 updateView(startdate);
335} 338}
336void KODayMatrix::repaintViewTimed() 339void KODayMatrix::repaintViewTimed()
337{ 340{
341 mRedrawNeeded = true;
342 bDays.fill( false);
343 hDays.fill( false);
344 eDays.fill( false);
338 mRepaintTimer->stop(); 345 mRepaintTimer->stop();
339 repaint(false); 346 repaint(false);
340} 347}
@@ -683,11 +690,23 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
683 updateViewTimed(); 690 updateViewTimed();
684 mPendingUpdateBeforeRepaint = false; 691 mPendingUpdateBeforeRepaint = false;
685 } 692 }
693#if 0
686 if ( myPix.width() != width() || myPix.height()!=height() ) { 694 if ( myPix.width() != width() || myPix.height()!=height() ) {
687 myPix.resize(size() ); 695 myPix.resize(size() );
688 mRedrawNeeded = true; 696 mRedrawNeeded = true;
689 } 697 }
690 698#endif
699 if ( oldW != width() || oldH !=height() )
700 mRedrawNeeded = true;
701
702 oldH = height() ;
703 oldW = width();
704 if ( myPix.width() < width() || myPix.height() < height() ) {
705 myPix.resize(size() );
706 mRedrawNeeded = true;
707
708 }
709
691 if ( mRedrawNeeded ) { 710 if ( mRedrawNeeded ) {
692 //qDebug("REDRAW "); 711 //qDebug("REDRAW ");
693 QPainter p(&myPix); 712 QPainter p(&myPix);
@@ -947,7 +966,8 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
947 } else { 966 } else {
948 //qDebug("NO redraw "); 967 //qDebug("NO redraw ");
949 } 968 }
950 bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); 969
970 bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,CopyROP);
951 mRedrawNeeded = false; 971 mRedrawNeeded = false;
952} 972}
953 973
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index 731117c..d725ead 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -227,6 +227,7 @@ protected:
227 void resizeEvent(QResizeEvent *); 227 void resizeEvent(QResizeEvent *);
228 228
229private: 229private:
230 int oldW, oldH;
230 bool mRedrawNeeded; 231 bool mRedrawNeeded;
231 KODaymatrixWhatsThis* mKODaymatrixWhatsThis; 232 KODaymatrixWhatsThis* mKODaymatrixWhatsThis;
232 bool mouseDown; 233 bool mouseDown;