summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-02-19 16:07:52 (UTC)
committer zautrix <zautrix>2005-02-19 16:07:52 (UTC)
commite15d171a0630656b6e4a66d6cab6a7d64a37434b (patch) (unidiff)
treef406dd7fc0d4300f18294bc7fbe7b06ab4524481 /korganizer
parent4858dcb045afc57ce98877cca787c4430146bea8 (diff)
downloadkdepimpi-e15d171a0630656b6e4a66d6cab6a7d64a37434b.zip
kdepimpi-e15d171a0630656b6e4a66d6cab6a7d64a37434b.tar.gz
kdepimpi-e15d171a0630656b6e4a66d6cab6a7d64a37434b.tar.bz2
mday mv fix
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index f558084..ddac6e4 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -227,69 +227,71 @@ void MonthViewItem::paint(QPainter *p)
227 int y = (height( listBox () ) - size -1 ) /2; 227 int y = (height( listBox () ) - size -1 ) /2;
228 228
229 if ( KOPrefs::instance()->mMonthShowIcons ) { 229 if ( KOPrefs::instance()->mMonthShowIcons ) {
230 if ( mInfo ) { 230 if ( mInfo ) {
231 p->fillRect ( x, y,size,size, Qt::darkGreen ); 231 p->fillRect ( x, y,size,size, Qt::darkGreen );
232 x += size + 1; 232 x += size + 1;
233 } 233 }
234 if ( mRecur ) { 234 if ( mRecur ) {
235 p->fillRect ( x, y,size,size, Qt::blue ); 235 p->fillRect ( x, y,size,size, Qt::blue );
236 x += size + 1; 236 x += size + 1;
237 } 237 }
238 if ( mAlarm ) { 238 if ( mAlarm ) {
239 p->fillRect ( x, y,size,size, Qt::red ); 239 p->fillRect ( x, y,size,size, Qt::red );
240 x += size + 1; 240 x += size + 1;
241 } 241 }
242 if ( mReply ) { 242 if ( mReply ) {
243 p->fillRect ( x, y,size,size, Qt::yellow ); 243 p->fillRect ( x, y,size,size, Qt::yellow );
244 x += size + 1; 244 x += size + 1;
245 } 245 }
246 } 246 }
247 if ( mMultiday ) { 247 if ( mMultiday ) {
248 int yyy = y+(size/2); 248 int yyy = y+(size/2);
249 int sizeM = size+2; 249 int sizeM = size+2;
250 p->setBrush( QBrush::SolidPattern ); 250 p->setBrush( QBrush::SolidPattern );
251 p->drawLine ( x+sizeM/2, yyy, x +sizeM +sizeM/2-2, yyy ) ; 251 p->drawLine ( x+1, yyy, x +sizeM +sizeM/2-1, yyy ) ;
252 if ( mMultiday == 2 || mMultiday == 3 ) { 252 if ( mMultiday == 2 || mMultiday == 3 ) {
253 QPointArray pa ( 3 ); 253 QPointArray pa ( 3 );
254 pa.setPoint (0, x, yyy ); 254 pa.setPoint (0, x, yyy );
255 pa.setPoint (1, x+sizeM/2, yyy+sizeM/2 ); 255 pa.setPoint (1, x+sizeM/2, yyy+sizeM/2 );
256 pa.setPoint (2, x+sizeM/2, yyy-sizeM/2 ); 256 pa.setPoint (2, x+sizeM/2, yyy-sizeM/2 );
257 p->drawPolygon( pa ); 257 p->drawPolygon( pa );
258 } 258 }
259 if ( mMultiday == 2 || mMultiday == 1 ) { 259 if ( mMultiday == 2 || mMultiday == 1 ) {
260 QPointArray pa ( 3 ); 260 QPointArray pa ( 3 );
261 pa.setPoint (0, x+sizeM +sizeM/2, yyy ); 261 pa.setPoint (0, x+sizeM +sizeM/2, yyy );
262 pa.setPoint (1, x+sizeM, yyy+sizeM/2 ); 262 pa.setPoint (1, x+sizeM, yyy+sizeM/2 );
263 pa.setPoint (2, x+sizeM, yyy-sizeM/2 ); 263 pa.setPoint (2, x+sizeM, yyy-sizeM/2 );
264 p->drawPolygon( pa ); 264 p->drawPolygon( pa );
265 } 265 }
266 if ( mMultiday == 1 ) { 266 if ( mMultiday == 1 ) {
267 p->fillRect ( x, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) ); 267 // p->fillRect ( x, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) );
268 268
269 p->drawLine ( x+1, yyy-sizeM/2, x+1, yyy+sizeM/2 );
269 } 270 }
270 if ( mMultiday == 3 ) { 271 if ( mMultiday == 3 ) {
271 p->fillRect ( x+sizeM, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) ); 272 // p->fillRect ( x+sizeM, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) );
273 p->drawLine ( x+sizeM +sizeM/2-1, yyy-sizeM/2, x+sizeM +sizeM/2-1, yyy+sizeM/2 );
272 274
273 } 275 }
274 x += sizeM/2 + 1; 276 x += sizeM/2 + 1;
275 x += sizeM + 1; 277 x += sizeM + 1;
276 } 278 }
277 QFontMetrics fm = p->fontMetrics(); 279 QFontMetrics fm = p->fontMetrics();
278 int yPos; 280 int yPos;
279 int pmheight = size; 281 int pmheight = size;
280 if( pmheight < fm.height() ) 282 if( pmheight < fm.height() )
281 yPos = fm.ascent() + fm.leading()/2; 283 yPos = fm.ascent() + fm.leading()/2;
282 else 284 else
283 yPos = pmheight/2 - fm.height()/2 + fm.ascent(); 285 yPos = pmheight/2 - fm.height()/2 + fm.ascent();
284 p->setPen( palette().color( QPalette::Normal, sel ? \ 286 p->setPen( palette().color( QPalette::Normal, sel ? \
285 QColorGroup::HighlightedText : QColorGroup::Foreground ) ); 287 QColorGroup::HighlightedText : QColorGroup::Foreground ) );
286 p->drawText( x, yPos, text() ); 288 p->drawText( x, yPos, text() );
287 if ( mIncidence->cancelled() ) { 289 if ( mIncidence->cancelled() ) {
288 int wid = fm.width( text() ); 290 int wid = fm.width( text() );
289 p->drawLine( x, yPos- fm.height()/2+3,x+wid, yPos- fm.height()/2 +3); 291 p->drawLine( x, yPos- fm.height()/2+3,x+wid, yPos- fm.height()/2 +3);
290 } 292 }
291 293
292} 294}
293 295
294int MonthViewItem::height(const QListBox *lb) const 296int MonthViewItem::height(const QListBox *lb) const
295{ 297{