-rw-r--r-- | korganizer/koagendaview.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 2996acb..218396d 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -80,10 +80,12 @@ using namespace KOrg; | |||
80 | 80 | ||
81 | TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : | 81 | TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : |
82 | QScrollView(parent,name,f) | 82 | QScrollView(parent,name,f) |
83 | { | 83 | { |
84 | myPix.resize( 1, 1 ); | ||
84 | mRows = rows; | 85 | mRows = rows; |
85 | 86 | ||
87 | mRedrawNeeded = true; | ||
86 | setMinimumHeight( 20 ); | 88 | setMinimumHeight( 20 ); |
87 | mCellHeight = KOPrefs::instance()->mHourSize*4; | 89 | mCellHeight = KOPrefs::instance()->mHourSize*4; |
88 | 90 | ||
89 | enableClipper(true); | 91 | enableClipper(true); |
@@ -115,8 +117,9 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) | |||
115 | // code assumes the latter... | 117 | // code assumes the latter... |
116 | 118 | ||
117 | // now, for a workaround... | 119 | // now, for a workaround... |
118 | // these two assignments fix the weird redraw bug | 120 | // these two assignments fix the weird redraw bug |
121 | if ( mRedrawNeeded ) { | ||
119 | cx = contentsX() + 2; | 122 | cx = contentsX() + 2; |
120 | cw = contentsWidth() - 2; | 123 | cw = contentsWidth() - 2; |
121 | // end of workaround | 124 | // end of workaround |
122 | 125 | ||
@@ -182,8 +185,14 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) | |||
182 | // increment indices | 185 | // increment indices |
183 | y += mCellHeight; | 186 | y += mCellHeight; |
184 | cell++; | 187 | cell++; |
185 | } | 188 | } |
189 | } else { | ||
190 | //qDebug("NO redraw "); | ||
191 | } | ||
192 | // double buffer not yet implemented | ||
193 | //bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); | ||
194 | //mRedrawNeeded = false; | ||
186 | } | 195 | } |
187 | 196 | ||
188 | /** | 197 | /** |
189 | Calculates the minimum width. | 198 | Calculates the minimum width. |
@@ -195,8 +204,9 @@ int TimeLabels::minimumWidth() const | |||
195 | 204 | ||
196 | /** updates widget's internal state */ | 205 | /** updates widget's internal state */ |
197 | void TimeLabels::updateConfig() | 206 | void TimeLabels::updateConfig() |
198 | { | 207 | { |
208 | mRedrawNeeded = true; | ||
199 | // set the font | 209 | // set the font |
200 | // config->setGroup("Fonts"); | 210 | // config->setGroup("Fonts"); |
201 | // QFont font = config->readFontEntry("TimeBar Font"); | 211 | // QFont font = config->readFontEntry("TimeBar Font"); |
202 | setFont(KOPrefs::instance()->mTimeBarFont); | 212 | setFont(KOPrefs::instance()->mTimeBarFont); |