z value related cleanups, including one fixme
svn path=/trunk/KDE/kdelibs/; revision=897861
This commit is contained in:
parent
c26e118bbf
commit
97869ca7c7
12
applet.cpp
12
applet.cpp
@ -459,8 +459,8 @@ void AppletPrivate::createMessageOverlay()
|
|||||||
zValue = child->zValue() + 1;
|
zValue = child->zValue() + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
messageOverlay->setZValue(zValue);
|
|
||||||
|
|
||||||
|
messageOverlay->setZValue(zValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppletPrivate::destroyMessageOverlay()
|
void AppletPrivate::destroyMessageOverlay()
|
||||||
@ -815,8 +815,14 @@ void Applet::setConfigurationRequired(bool needsConfig, const QString &reason)
|
|||||||
configWidget->setDrawBackground(true);
|
configWidget->setDrawBackground(true);
|
||||||
connect(configWidget, SIGNAL(clicked()), this, SLOT(showConfigurationInterface()));
|
connect(configWidget, SIGNAL(clicked()), this, SLOT(showConfigurationInterface()));
|
||||||
configLayout->addItem(configWidget, row, 1);
|
configLayout->addItem(configWidget, row, 1);
|
||||||
//FIXME: this thing seems necessary for some applets, others not
|
// raise the overlay above all the other children!
|
||||||
configWidget->setZValue(999);
|
int zValue = 100;
|
||||||
|
foreach (QGraphicsItem *child, QGraphicsItem::children()) {
|
||||||
|
if (child->zValue() > zValue) {
|
||||||
|
zValue = child->zValue() + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
configWidget->setZValue(zValue);
|
||||||
} else {
|
} else {
|
||||||
PushButton *configWidget = new PushButton(d->messageOverlay);
|
PushButton *configWidget = new PushButton(d->messageOverlay);
|
||||||
configWidget->setText(i18n("Configure..."));
|
configWidget->setText(i18n("Configure..."));
|
||||||
|
@ -456,6 +456,7 @@ void DesktopToolBox::showToolBox()
|
|||||||
|
|
||||||
if (!d->toolBacker) {
|
if (!d->toolBacker) {
|
||||||
d->toolBacker = new EmptyGraphicsItem(this);
|
d->toolBacker = new EmptyGraphicsItem(this);
|
||||||
|
d->toolBacker->setZValue(zValue() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
d->toolBacker->setIsToolbar(isToolbar());
|
d->toolBacker->setIsToolbar(isToolbar());
|
||||||
|
@ -120,7 +120,7 @@ void ToolBox::addTool(QAction *action)
|
|||||||
tool->hide();
|
tool->hide();
|
||||||
const int height = static_cast<int>(tool->boundingRect().height());
|
const int height = static_cast<int>(tool->boundingRect().height());
|
||||||
tool->setPos(toolPosition(height));
|
tool->setPos(toolPosition(height));
|
||||||
tool->setZValue(zValue() + 1);
|
tool->setZValue(zValue() + 10);
|
||||||
tool->setToolTip(action->text());
|
tool->setToolTip(action->text());
|
||||||
|
|
||||||
//make enabled/disabled tools appear/disappear instantly
|
//make enabled/disabled tools appear/disappear instantly
|
||||||
|
Loading…
x
Reference in New Issue
Block a user