move the size adjustment in a private member
svn path=/trunk/KDE/kdelibs/; revision=1206703
This commit is contained in:
parent
03a4645d5a
commit
07444819b7
@ -514,7 +514,7 @@ void Extender::itemAddedEvent(ExtenderItem *item, const QPointF &pos)
|
|||||||
d->updateEmptyExtenderLabel();
|
d->updateEmptyExtenderLabel();
|
||||||
d->updateBorders();
|
d->updateBorders();
|
||||||
|
|
||||||
resize(d->mainWidget->effectiveSizeHint(Qt::PreferredSize));
|
d->adjustSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Extender::itemRemovedEvent(ExtenderItem *item)
|
void Extender::itemRemovedEvent(ExtenderItem *item)
|
||||||
@ -541,7 +541,7 @@ void Extender::itemRemovedEvent(ExtenderItem *item)
|
|||||||
static_cast<QGraphicsLayoutItem *>(d->scrollWidget)->updateGeometry();
|
static_cast<QGraphicsLayoutItem *>(d->scrollWidget)->updateGeometry();
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
|
|
||||||
resize(d->mainWidget->effectiveSizeHint(Qt::PreferredSize));
|
d->adjustSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Extender::itemHoverEnterEvent(ExtenderItem *item)
|
void Extender::itemHoverEnterEvent(ExtenderItem *item)
|
||||||
@ -915,6 +915,11 @@ void ExtenderPrivate::setDisabledBordersHint(const FrameSvg::EnabledBorders bord
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ExtenderPrivate::adjustSize()
|
||||||
|
{
|
||||||
|
q->resize(mainWidget->effectiveSizeHint(Qt::PreferredSize));
|
||||||
|
}
|
||||||
|
|
||||||
bool Extender::isEmpty() const
|
bool Extender::isEmpty() const
|
||||||
{
|
{
|
||||||
//It's empty if it doesn't have items or has only group that are empty and autohide
|
//It's empty if it doesn't have items or has only group that are empty and autohide
|
||||||
|
@ -336,7 +336,7 @@ void ExtenderGroupPrivate::addItemToGroup(Plasma::ExtenderItem *item, const QPoi
|
|||||||
static_cast<QGraphicsLayoutItem *>(q->extender()->d->scrollWidget)->updateGeometry();
|
static_cast<QGraphicsLayoutItem *>(q->extender()->d->scrollWidget)->updateGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
q->extender()->resize(q->extender()->effectiveSizeHint(Qt::PreferredSize));
|
q->extender()->d->adjustSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ void ExtenderGroupPrivate::removeItemFromGroup(Plasma::ExtenderItem *item)
|
|||||||
static_cast<QGraphicsLayoutItem *>(childsWidget)->updateGeometry();
|
static_cast<QGraphicsLayoutItem *>(childsWidget)->updateGeometry();
|
||||||
static_cast<QGraphicsLayoutItem *>(q->extender()->d->scrollWidget)->updateGeometry();
|
static_cast<QGraphicsLayoutItem *>(q->extender()->d->scrollWidget)->updateGeometry();
|
||||||
|
|
||||||
q->extender()->resize(q->extender()->effectiveSizeHint(Qt::PreferredSize));
|
q->extender()->d->adjustSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ class ExtenderPrivate
|
|||||||
void setPositionFromDragPosition(const QPointF &pos);
|
void setPositionFromDragPosition(const QPointF &pos);
|
||||||
ExtenderGroup *findGroup(const QString &name) const;
|
ExtenderGroup *findGroup(const QString &name) const;
|
||||||
void setDisabledBordersHint(const FrameSvg::EnabledBorders borders);
|
void setDisabledBordersHint(const FrameSvg::EnabledBorders borders);
|
||||||
|
void adjustSize();
|
||||||
|
|
||||||
Extender *q;
|
Extender *q;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user