show only a wrench icon as configuration button when in panel (and it's not a popupappllet)

BUG:240963

svn path=/trunk/KDE/kdelibs/; revision=1136000
This commit is contained in:
Marco Martin 2010-06-08 16:20:15 +00:00
parent 5b2983c17e
commit 6191e5c9ee

View File

@ -1008,7 +1008,13 @@ void Applet::setConfigurationRequired(bool needsConfig, const QString &reason)
}
PushButton *configWidget = new PushButton(d->messageOverlay);
configWidget->setText(i18n("Configure..."));
if (!qobject_cast<Plasma::PopupApplet *>(this) && (formFactor() == Plasma::Horizontal || formFactor() == Plasma::Vertical)) {
configWidget->setImage("widgets/configuration-icons", "configure");
configWidget->setMaximumSize(24,24);
configWidget->setMinimumSize(24,24);
} else {
configWidget->setText(i18n("Configure..."));
}
connect(configWidget, SIGNAL(clicked()), this, SLOT(showConfigurationInterface()));
configLayout->addItem(configWidget, row, 1);