fix root items appearance

svn path=/trunk/KDE/kdelibs/; revision=1184861
This commit is contained in:
Marco Martin 2010-10-11 16:04:06 +00:00
parent f947ed9495
commit b5688057bc

View File

@ -343,12 +343,6 @@ void ExtenderItem::setExtender(Extender *extender, const QPointF &pos)
{ {
Q_ASSERT(extender); Q_ASSERT(extender);
if (extender->appearance() != Extender::NoBorders) {
d->toolbox->setBackgroundPrefix("root");
} else {
d->toolbox->setBackgroundPrefix(QString());
}
//themeChanged() has to now that by now, we're no longer dragging, even though the QDrag has not //themeChanged() has to now that by now, we're no longer dragging, even though the QDrag has not
//been entirely finished. //been entirely finished.
d->dragStarted = false; d->dragStarted = false;
@ -831,6 +825,16 @@ void ExtenderItemPrivate::updateToolBox()
Q_ASSERT(toolbox); Q_ASSERT(toolbox);
Q_ASSERT(toolboxLayout); Q_ASSERT(toolboxLayout);
if (group) {
toolbox->setBackgroundPrefix("grouped");
} else {
if (extender->appearance() != Extender::NoBorders) {
toolbox->setBackgroundPrefix("root");
} else {
toolbox->setBackgroundPrefix(QString());
}
}
QAction *closeAction = actions.value("close"); QAction *closeAction = actions.value("close");
QAction *returnToSourceAction = actions.value("extenderItemReturnToSource"); QAction *returnToSourceAction = actions.value("extenderItemReturnToSource");
bool returnToSourceVisibility = q->isDetached() && sourceApplet && (hostApplet()->immutability() == Plasma::Mutable); bool returnToSourceVisibility = q->isDetached() && sourceApplet && (hostApplet()->immutability() == Plasma::Mutable);