diff --git a/src/controls/BasicListItem.qml b/src/controls/BasicListItem.qml --- a/src/controls/BasicListItem.qml +++ b/src/controls/BasicListItem.qml @@ -76,7 +76,7 @@ Layout.maximumHeight: Layout.minimumHeight Layout.minimumWidth: height selected: layout.indicateActiveFocus && (listItem.highlighted || listItem.checked || listItem.pressed) - color: listItem.icon && listItem.icon.color && listItem.icon.color.a > 0 ? listItem.icon.color : Qt.rgba(0, 0, 0, 0) + color: listItem.icon && listItem.icon.color && listItem.icon.color.a > 0 ? listItem.icon.color : (selected ? Theme.highlightedTextColor : Theme.textColor) } QQC2.Label { id: labelItem diff --git a/src/desktopicon.cpp b/src/desktopicon.cpp --- a/src/desktopicon.cpp +++ b/src/desktopicon.cpp @@ -492,7 +492,7 @@ icon = QIcon(localIconSource); } //heuristic to set every icon as mask, maybe only android? - if (!icon.isNull()) { + if (!icon.isNull() && (iconSource.endsWith("-symbolic") || m_color != Qt::transparent)) { icon.setIsMask(true); } } @@ -510,8 +510,7 @@ if (m_isMask || //this is an heuristic to decide when to tint and when to just draw //(fullcolor icons) in reality on basic styles the only colored icons should be -symbolic, this heuristic is the most compatible middle ground - //48 is the usual value for "big" icons (enum we can't access from here) which we need to take dpis into account - (icon.isMask() && (iconSource.endsWith("-symbolic") || size.width() < 48.0 * ratio)) || + icon.isMask() || iconSource.endsWith("-symbolic") || (isPath && tintColor != Qt::transparent)) { QPainter p(&img); p.setCompositionMode(QPainter::CompositionMode_SourceIn); diff --git a/src/libkirigami/platformtheme.h b/src/libkirigami/platformtheme.h --- a/src/libkirigami/platformtheme.h +++ b/src/libkirigami/platformtheme.h @@ -251,14 +251,13 @@ //background colors void setBackgroundColor(const QColor &color); void setHighlightColor(const QColor &color); - + //decoration colors void setFocusColor(const QColor &color); void setHoverColor(const QColor &color); void setDefaultFont(const QFont &defaultFont); void setPalette(const QPalette &palette); - private: PlatformThemePrivate *d; friend class PlatformThemePrivate;