ColorGroup comment.

work/plasma6
Lana Black 11 months ago
parent 6351d13444
commit 3230f9d370

@ -40,8 +40,10 @@ IconItem::IconItem(QQuickItem *parent)
m_textureChanged(false),
m_sizeChanged(false),
m_usesPlasmaTheme(false),
m_lastValidSourceName(QString()),
m_colorGroup(Plasma::Theme::NormalColorGroup)
m_lastValidSourceName(QString())
// FIXME:
// See the comment in the header
// m_colorGroup(Plasma::Theme::NormalColorGroup)
{
setFlag(ItemHasContents, true);
connect(KIconLoader::global(), SIGNAL(iconLoaderSettingsChanged()),
@ -96,7 +98,9 @@ void IconItem::setSource(const QVariant &source)
} else {
if (!m_svgIcon) {
m_svgIcon = std::make_unique<KSvg::Svg>(this);
m_svgIcon->setColorGroup(m_colorGroup);
// FIXME:
// See the comment in the header
//m_svgIcon->setColorGroup(m_colorGroup);
m_svgIcon->setStatus(KSvg::Svg::Normal);
m_svgIcon->setUsingRenderingCache(false);
m_svgIcon->setDevicePixelRatio((window() ? window()->devicePixelRatio() : qApp->devicePixelRatio()));

@ -23,6 +23,7 @@
// KF
#include <KSvg/Svg>
#include <Plasma/Theme>
// this file is based on PlasmaCore::IconItem class, thanks to KDE
namespace Latte {
@ -49,7 +50,10 @@ class IconItem : public QQuickItem
* Specifies the color group to use for this icon
* This only applies to icons loaded from the plasma theme
*/
Q_PROPERTY(Plasma::Theme::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY colorGroupChanged)
// FIXME:
// this needs to be replaced with ColorSet from Kirigami2
// https://api.kde.org/frameworks/kirigami/html/classKirigami_1_1Platform_1_1PlatformTheme.html
//Q_PROPERTY(Plasma::Theme::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY colorGroupChanged)
/**
* Specifies the overlay(s) for this icon

Loading…
Cancel
Save