Revert "[IconItem] Add selected property"

This reverts commit 9c8cf7078eccbb4e54d5c53abe2c62090d4551b9
This commit is contained in:
Mikel Johnson 2020-11-20 13:26:54 +00:00
parent 624fc88f7a
commit f8ae743c2f
3 changed files with 1 additions and 35 deletions

View File

@ -252,7 +252,6 @@ IconItem::IconItem(QQuickItem *parent)
m_iconItemSource(new NullSource(this)), m_iconItemSource(new NullSource(this)),
m_status(Plasma::Svg::Normal), m_status(Plasma::Svg::Normal),
m_active(false), m_active(false),
m_selected(false),
m_animated(true), m_animated(true),
m_usesPlasmaTheme(true), m_usesPlasmaTheme(true),
m_roundToIconSize(true), m_roundToIconSize(true),
@ -449,26 +448,6 @@ void IconItem::setActive(bool active)
emit activeChanged(); emit activeChanged();
} }
bool IconItem::isSelected() const
{
return m_selected;
}
void IconItem::setSelected(bool selected)
{
if (m_selected == selected) {
return;
}
m_selected = selected;
if (isComponentComplete()) {
m_allowNextAnimation = true;
schedulePixmapUpdate();
}
emit selectedChanged();
}
bool IconItem::isAnimated() const bool IconItem::isAnimated() const
{ {
return m_animated; return m_animated;
@ -747,8 +726,6 @@ void IconItem::loadPixmap()
result = KIconLoader::global()->iconEffect()->apply(result, KIconLoader::Desktop, KIconLoader::DisabledState); result = KIconLoader::global()->iconEffect()->apply(result, KIconLoader::Desktop, KIconLoader::DisabledState);
} else if (m_active) { } else if (m_active) {
result = KIconLoader::global()->iconEffect()->apply(result, KIconLoader::Desktop, KIconLoader::ActiveState); result = KIconLoader::global()->iconEffect()->apply(result, KIconLoader::Desktop, KIconLoader::ActiveState);
} else if (m_selected) {
result = KIconLoader::global()->iconEffect()->apply(result, KIconLoader::Desktop, KIconLoader::SelectedState);
} }
const QSize oldPaintedSize = paintedSize(); const QSize oldPaintedSize = paintedSize();

View File

@ -61,12 +61,6 @@ class IconItem : public QQuickItem
*/ */
Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged) Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged)
/**
* Apply a visual indication that this icon is selected.
* @since 5.77
*/
Q_PROPERTY(bool selected READ isSelected WRITE setSelected NOTIFY selectedChanged)
/** /**
* Sets the image in a selected status. * Sets the image in a selected status.
* Svgs can be colored with system color themes, if the status is selected, * Svgs can be colored with system color themes, if the status is selected,
@ -130,9 +124,6 @@ public:
bool isActive() const; bool isActive() const;
void setActive(bool active); void setActive(bool active);
bool isSelected() const;
void setSelected(bool selected);
bool isAnimated() const; bool isAnimated() const;
void setAnimated(bool animated); void setAnimated(bool animated);
@ -165,7 +156,6 @@ public:
Q_SIGNALS: Q_SIGNALS:
void overlaysChanged(); void overlaysChanged();
void activeChanged(); void activeChanged();
void selectedChanged();
void sourceChanged(); void sourceChanged();
void animatedChanged(); void animatedChanged();
void usesPlasmaThemeChanged(); void usesPlasmaThemeChanged();
@ -197,7 +187,6 @@ private:
Plasma::Svg::Status m_status; Plasma::Svg::Status m_status;
bool m_active; bool m_active;
bool m_selected;
bool m_animated; bool m_animated;
bool m_usesPlasmaTheme; bool m_usesPlasmaTheme;
bool m_roundToIconSize; bool m_roundToIconSize;

View File

@ -49,7 +49,7 @@ T.TabButton {
colorGroup: control.PlasmaCore.ColorScope.colorGroup colorGroup: control.PlasmaCore.ColorScope.colorGroup
visible: source.length > 0 && control.display !== T.AbstractButton.TextOnly visible: source.length > 0 && control.display !== T.AbstractButton.TextOnly
source: control.icon ? (control.icon.name || control.icon.source) : "" source: control.icon ? (control.icon.name || control.icon.source) : ""
selected: control.visualFocus active: control.visualFocus
} }
Label { Label {
id: label id: label