author | zautrix <zautrix> | 2005-03-23 13:55:05 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-23 13:55:05 (UTC) |
commit | 53ba86911c8d22d2ca14ac19da85a728de710642 (patch) (side-by-side diff) | |
tree | 429910d6955c629fc921e9a3bd537ec90d2378b7 /korganizer/komonthview.cpp | |
parent | 913291ec9784520cc6ff9769081c03bd74a5ab07 (diff) | |
download | kdepimpi-53ba86911c8d22d2ca14ac19da85a728de710642.zip kdepimpi-53ba86911c8d22d2ca14ac19da85a728de710642.tar.gz kdepimpi-53ba86911c8d22d2ca14ac19da85a728de710642.tar.bz2 |
layout fixes
-rw-r--r-- | korganizer/komonthview.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 9fd1f68..8ee5bc3 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -996,2 +996,7 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) emit incidenceSelected( 0 ); + + mComputeLayoutTimer = new QTimer( this ); + connect (mComputeLayoutTimer ,SIGNAL(timeout()), this, SLOT ( slotComputeLayout())); + + #ifndef DESKTOP_VERSION @@ -1353,3 +1358,14 @@ void KOMonthView::resizeEvent(QResizeEvent * e) { - //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); + qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); + if ( isVisible() ) { + qDebug("KOMonthView::isVisible "); + slotComputeLayout(); + } else + mComputeLayoutTimer->start( 100 ); +} + +void KOMonthView::slotComputeLayout() +{ + mComputeLayoutTimer->stop(); + qDebug("KOMonthView::Post - resizeEvent %d %d ", width(), height() ); computeLayout(); @@ -1360,2 +1376,3 @@ void KOMonthView::resizeEvent(QResizeEvent * e) mCells[0]->setFocus(); + } @@ -1380,4 +1397,6 @@ void KOMonthView::computeLayoutWeek() - if ( lastWid == width() && lastHei == height() ) + if ( lastWid == width() && lastHei == height() ) { + qDebug("KOListWeekView::No compute layout needed "); return; + } lastWid = width(); @@ -1507,2 +1526,3 @@ void KOMonthView::computeLayout() if ( lastWid == width() && lastHei == height() ){ + qDebug("KOMonthview::No compute layout needed "); return; @@ -1512,3 +1532,3 @@ void KOMonthView::computeLayout() lastHei = height(); - //qDebug("KOMonthView::computeLayout() MMM ------------------------------------ "); + qDebug("KOMonthView::computeLayout() MMM ------------------- "); QFontMetrics fm ( mWeekLabels[0]->font() ); |