svgColorGroup -> colorGroup
This commit is contained in:
parent
9513a005a8
commit
05d71947c8
@ -40,7 +40,7 @@ IconItem::IconItem(QQuickItem *parent)
|
||||
m_svgIcon(0),
|
||||
m_smooth(false),
|
||||
m_active(false),
|
||||
m_svgColorGroup(Plasma::Svg::NormalColorGroup),
|
||||
m_colorGroup(Plasma::Svg::NormalColorGroup),
|
||||
m_animValue(0)
|
||||
{
|
||||
m_loadPixmapTimer.setSingleShot(true);
|
||||
@ -93,7 +93,7 @@ void IconItem::setSource(const QVariant &source)
|
||||
} else if (source.canConvert<QString>()) {
|
||||
if (!m_svgIcon) {
|
||||
m_svgIcon = new Plasma::Svg(this);
|
||||
m_svgIcon->setColorGroup(m_svgColorGroup);
|
||||
m_svgIcon->setColorGroup(m_colorGroup);
|
||||
}
|
||||
//try as a svg icon
|
||||
m_svgIcon->setImagePath("icons/" + source.toString().split("-").first());
|
||||
@ -150,24 +150,24 @@ QVariant IconItem::source() const
|
||||
return m_source;
|
||||
}
|
||||
|
||||
void IconItem::setSvgColorGroup(Plasma::Svg::ColorGroup group)
|
||||
void IconItem::setColorGroup(Plasma::Svg::ColorGroup group)
|
||||
{
|
||||
if (m_svgColorGroup == group) {
|
||||
if (m_colorGroup == group) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_svgColorGroup = group;
|
||||
m_colorGroup = group;
|
||||
|
||||
if (m_svgIcon) {
|
||||
m_svgIcon->setColorGroup(group);
|
||||
}
|
||||
|
||||
emit svgColorGroupChanged();
|
||||
emit colorGroupChanged();
|
||||
}
|
||||
|
||||
Plasma::Svg::ColorGroup IconItem::svgColorGroup() const
|
||||
Plasma::Svg::ColorGroup IconItem::colorGroup() const
|
||||
{
|
||||
return m_svgColorGroup;
|
||||
return m_colorGroup;
|
||||
}
|
||||
|
||||
bool IconItem::isActive() const
|
||||
|
@ -36,7 +36,7 @@ class IconItem : public QQuickItem
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QVariant source READ source WRITE setSource NOTIFY sourceChanged)
|
||||
Q_PROPERTY(Plasma::Svg::ColorGroup svgColorGroup READ svgColorGroup WRITE setSvgColorGroup NOTIFY svgColorGroupChanged)
|
||||
Q_PROPERTY(Plasma::Svg::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY colorGroupChanged)
|
||||
Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
|
||||
Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged)
|
||||
Q_PROPERTY(bool valid READ isValid NOTIFY validChanged)
|
||||
@ -49,8 +49,8 @@ public:
|
||||
void setSource(const QVariant &source);
|
||||
QVariant source() const;
|
||||
|
||||
void setSvgColorGroup(Plasma::Svg::ColorGroup group);
|
||||
Plasma::Svg::ColorGroup svgColorGroup() const;
|
||||
void setColorGroup(Plasma::Svg::ColorGroup group);
|
||||
Plasma::Svg::ColorGroup colorGroup() const;
|
||||
|
||||
bool isActive() const;
|
||||
void setActive(bool active);
|
||||
@ -70,7 +70,7 @@ Q_SIGNALS:
|
||||
void sourceChanged();
|
||||
void smoothChanged();
|
||||
void validChanged();
|
||||
void svgColorGroupChanged();
|
||||
void colorGroupChanged();
|
||||
|
||||
private Q_SLOTS:
|
||||
void loadPixmap();
|
||||
@ -99,7 +99,7 @@ private:
|
||||
QPixmap m_iconPixmap;
|
||||
QPixmap m_oldIconPixmap;
|
||||
|
||||
Plasma::Svg::ColorGroup m_svgColorGroup;
|
||||
Plasma::Svg::ColorGroup m_colorGroup;
|
||||
|
||||
//animation on pixmap change
|
||||
QPropertyAnimation *m_animation;
|
||||
|
@ -244,7 +244,7 @@ Item {
|
||||
width: valid? parent.height: 0
|
||||
height: width
|
||||
active: shadow.hasOverState && mouse.containsMouse
|
||||
svgColorGroup: PlasmaCore.Svg.ButtonColorGroup
|
||||
colorGroup: PlasmaCore.Svg.ButtonColorGroup
|
||||
}
|
||||
|
||||
Label {
|
||||
|
@ -363,7 +363,7 @@ Item {
|
||||
width: valid ? Math.min(parent.width, parent.height): 0
|
||||
height: width
|
||||
active: delegate.item.hasOverState && mouse.containsMouse
|
||||
svgColorGroup: mouse.containsMouse || !button.flat ? PlasmaCore.Svg.ButtonColorGroup : PlasmaCore.Svg.NormalColorGroup
|
||||
colorGroup: mouse.containsMouse || !button.flat ? PlasmaCore.Svg.ButtonColorGroup : PlasmaCore.Svg.NormalColorGroup
|
||||
}
|
||||
|
||||
Label {
|
||||
|
Loading…
Reference in New Issue
Block a user