react to enabled changed
This commit is contained in:
parent
3d21d43182
commit
d177b0a31d
@ -53,6 +53,9 @@ IconItem::IconItem(QDeclarativeItem *parent)
|
|||||||
this, SLOT(implicitHeightChanged()));
|
this, SLOT(implicitHeightChanged()));
|
||||||
|
|
||||||
|
|
||||||
|
connect(this, SIGNAL(enabledChanged()),
|
||||||
|
this, SLOT(loadPixmap()));
|
||||||
|
|
||||||
//initialize implicit size to the Dialog size
|
//initialize implicit size to the Dialog size
|
||||||
setImplicitWidth(KIconLoader::global()->currentSize(KIconLoader::Dialog));
|
setImplicitWidth(KIconLoader::global()->currentSize(KIconLoader::Dialog));
|
||||||
setImplicitHeight(KIconLoader::global()->currentSize(KIconLoader::Dialog));
|
setImplicitHeight(KIconLoader::global()->currentSize(KIconLoader::Dialog));
|
||||||
@ -248,7 +251,6 @@ void IconItem::loadPixmap()
|
|||||||
{
|
{
|
||||||
int size = qMin(width(), height());
|
int size = qMin(width(), height());
|
||||||
|
|
||||||
|
|
||||||
//FIXME: Heuristic: allow 24x24 for icons/ that are in the systray(ugly)
|
//FIXME: Heuristic: allow 24x24 for icons/ that are in the systray(ugly)
|
||||||
if (m_svgIcon && m_svgIcon->imagePath().contains("icons/") &&
|
if (m_svgIcon && m_svgIcon->imagePath().contains("icons/") &&
|
||||||
size > KIconLoader::SizeSmallMedium &&
|
size > KIconLoader::SizeSmallMedium &&
|
||||||
|
@ -77,12 +77,11 @@ Q_SIGNALS:
|
|||||||
void implicitHeightChanged();
|
void implicitHeightChanged();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
void loadPixmap();
|
||||||
void animationFinished();
|
void animationFinished();
|
||||||
void valueChanged(const QVariant &value);
|
void valueChanged(const QVariant &value);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void loadPixmap();
|
|
||||||
|
|
||||||
//all the ways we can set an source. Only one of them will be valid
|
//all the ways we can set an source. Only one of them will be valid
|
||||||
QIcon m_icon;
|
QIcon m_icon;
|
||||||
Plasma::Svg *m_svgIcon;
|
Plasma::Svg *m_svgIcon;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user