diff --git a/layouts/boxlayout.cpp b/layouts/boxlayout.cpp index b2a14c292..a1c2e715f 100644 --- a/layouts/boxlayout.cpp +++ b/layouts/boxlayout.cpp @@ -305,7 +305,7 @@ void BoxLayout::insertItem(int index, LayoutItem *item) d->children.insert(index, item); if (animator()) { - animator()->setCurrentState(item,LayoutAnimator::InsertedState); + animator()->setCurrentState(item, LayoutAnimator::InsertedState); } updateGeometry(); diff --git a/layouts/layout.cpp b/layouts/layout.cpp index a65d7532e..7779edfd6 100644 --- a/layouts/layout.cpp +++ b/layouts/layout.cpp @@ -129,6 +129,9 @@ void Layout::invalidate() do { parentLayout = dynamic_cast(layout->parent()); if (parentLayout) { + if (parentLayout->d->relayouting) { + break; + } layout = parentLayout; } } while (parentLayout); diff --git a/widgets/flash.cpp b/widgets/flash.cpp index 5a00a2aa1..07428ee68 100644 --- a/widgets/flash.cpp +++ b/widgets/flash.cpp @@ -90,11 +90,6 @@ void Flash::setDuration( int duration ) d->defaultDuration = duration; } -QSizeF Flash::sizeHint() const -{ - return minimumSize(); -} - void Flash::setColor( const QColor &color ) { d->color = color; @@ -189,9 +184,5 @@ void Flash::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *optio painter->drawPixmap(0, 0, Plasma::Phase::self()->animationResult(d->animId)); } } -void Flash::setSize( const QSizeF & size ) -{ - Widget::setSize(size); -} #include "flash.moc" diff --git a/widgets/flash.h b/widgets/flash.h index 8e3ce0862..492607eb4 100644 --- a/widgets/flash.h +++ b/widgets/flash.h @@ -43,9 +43,6 @@ class PLASMA_EXPORT Flash : public Plasma::Widget void paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); QRectF boundingRect() const; - virtual QSizeF sizeHint() const; - - void setSize( const QSizeF & ); void setFont( const QFont & ); void setColor( const QColor & ); diff --git a/widgets/widget.cpp b/widgets/widget.cpp index e9399f583..06abd0f38 100644 --- a/widgets/widget.cpp +++ b/widgets/widget.cpp @@ -278,6 +278,7 @@ QRectF Widget::boundingRect() const void Widget::resize(const QSizeF& size) { + //FIXME: we need to respect minimum size here i think setGeometry(QRectF(pos(), size)); }