react to enabled changed

This commit is contained in:
Marco Martin 2012-11-27 14:02:34 +01:00
parent 3d21d43182
commit d177b0a31d
2 changed files with 4 additions and 3 deletions

View File

@ -53,6 +53,9 @@ IconItem::IconItem(QDeclarativeItem *parent)
this, SLOT(implicitHeightChanged()));
connect(this, SIGNAL(enabledChanged()),
this, SLOT(loadPixmap()));
//initialize implicit size to the Dialog size
setImplicitWidth(KIconLoader::global()->currentSize(KIconLoader::Dialog));
setImplicitHeight(KIconLoader::global()->currentSize(KIconLoader::Dialog));
@ -248,7 +251,6 @@ void IconItem::loadPixmap()
{
int size = qMin(width(), height());
//FIXME: Heuristic: allow 24x24 for icons/ that are in the systray(ugly)
if (m_svgIcon && m_svgIcon->imagePath().contains("icons/") &&
size > KIconLoader::SizeSmallMedium &&

View File

@ -77,12 +77,11 @@ Q_SIGNALS:
void implicitHeightChanged();
private Q_SLOTS:
void loadPixmap();
void animationFinished();
void valueChanged(const QVariant &value);
private:
void loadPixmap();
//all the ways we can set an source. Only one of them will be valid
QIcon m_icon;
Plasma::Svg *m_svgIcon;