summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-19 12:41:09 (UTC)
committer zautrix <zautrix>2005-03-19 12:41:09 (UTC)
commit0aa5a7dce6ac1224395f7cb3fae488ba566f0e38 (patch) (unidiff)
treeb0950df228b2d9d2486977f7906ce4f0d9284cba
parentea9e00a1f70e9c3c855707213b51c6b6d43c330c (diff)
downloadkdepimpi-0aa5a7dce6ac1224395f7cb3fae488ba566f0e38.zip
kdepimpi-0aa5a7dce6ac1224395f7cb3fae488ba566f0e38.tar.gz
kdepimpi-0aa5a7dce6ac1224395f7cb3fae488ba566f0e38.tar.bz2
agenda fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index d7ea4d4..e029fdb 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -268,8 +268,5 @@ EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name)
268 else mPixmap = SmallIcon("1downarrow"); 268 else mPixmap = SmallIcon("1downarrow");
269 mEnabled.resize(mColumns); 269 mEnabled.resize(mColumns);
270 if (mLocation == Top) 270 setMinimumHeight(mPixmap.height());
271 setMaximumHeight(0);
272 else
273 setMinimumHeight(mPixmap.height());
274} 271}
275 272
@@ -291,7 +288,7 @@ void EventIndicator::drawContents(QPainter *p)
291 int cellWidth = contentsRect().right()/mColumns; 288 int cellWidth = contentsRect().right()/mColumns;
292 int xOffset = KOGlobals::self()->reverseLayout() ? 289 int xOffset = KOGlobals::self()->reverseLayout() ?
293 (mColumns - 1 - i)*cellWidth + cellWidth/2 -mPixmap.width()/2 : 290 (mColumns - 1 - i)*cellWidth + (cellWidth -mPixmap.width())/2 :
294 i*cellWidth + cellWidth/2 -mPixmap.width()/2; 291 i*cellWidth + (cellWidth -mPixmap.width()) /2;
295 p->drawPixmap(QPoint(xOffset,0),mPixmap); 292 p->drawPixmap(QPoint(1+xOffset,0),mPixmap);
296 } 293 }
297 } 294 }
@@ -329,4 +326,6 @@ void EventIndicator::setPaintWidget( KDGanttMinimizeSplitter * w )
329{ 326{
330 mPaintWidget = w; 327 mPaintWidget = w;
328 setMaximumHeight(0);
329 setMinimumHeight(0);
331} 330}
332void EventIndicator::changeColumns(int columns) 331void EventIndicator::changeColumns(int columns)
@@ -411,17 +410,20 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
411 // create event indicator bars 410 // create event indicator bars
412 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); 411 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame);
413 agendaLayout->addWidget(mEventIndicatorTop,0,1); 412#ifndef DESKTOP_VERSION
414 413 // FIX
414 mEventIndicatorTop->setPaintWidget( mSplitterAgenda );
415#endif
415 mDayLabelsFrame = new QHBox(agendaFrame); 416 mDayLabelsFrame = new QHBox(agendaFrame);
416 //topLayout->addWidget(mDayLabelsFrame); 417 //topLayout->addWidget(mDayLabelsFrame);
417 mDayLabels = new QFrame (mDayLabelsFrame); 418 mDayLabels = new QFrame (mDayLabelsFrame);
418 mLayoutDayLabels = new QHBoxLayout(mDayLabels); 419 mLayoutDayLabels = new QHBoxLayout(mDayLabels);
419 agendaLayout->addMultiCellWidget(mDayLabelsFrame ,1,1,0,2); 420 agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2);
420 mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); 421 agendaLayout->addWidget(mEventIndicatorTop,1,1);
422
421 mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom, 423 mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom,
422 agendaFrame); 424 agendaFrame);
423 agendaLayout->addWidget(mEventIndicatorBottom,3,1); 425 agendaLayout->addWidget(mEventIndicatorBottom,3,1);
424 QWidget *dummyAgendaRight = new QWidget(agendaFrame); 426 QWidget *dummyAgendaRight = new QWidget(agendaFrame);
425 agendaLayout->addWidget(dummyAgendaRight,0,2); 427 agendaLayout->addWidget(dummyAgendaRight,1,2);
426 428
427 // Create time labels 429 // Create time labels