https://bugs.kde.org/show_bug.cgi?id=492553
aristsakas <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #3 from aristsakas <[email protected]> --- (In reply to Ken from comment #2) > I believe this is actually an issue with how KIO handles highlighting, and > requires selected + active instead of just selected. I am unsure if this is > the correct way to fix this issue, but it does work and does not seem to > break other things for me. > > > diff --git a/src/filewidgets/kfileplacesview.cpp > b/src/filewidgets/kfileplacesview.cpp > index 46153992d..33192e8f7 100644 > --- a/src/filewidgets/kfileplacesview.cpp > +++ b/src/filewidgets/kfileplacesview.cpp > @@ -185,8 +185,8 @@ void KFilePlacesViewDelegate::paint(QPainter *painter, > const QStyleOptionViewIte > KIconLoader::global()->setCustomPalette(opt.palette); > } > > - const bool selectedAndActive = (opt.state & QStyle::State_Selected) && > (opt.state & QStyle::State_Active); > - QIcon::Mode mode = selectedAndActive ? QIcon::Selected : QIcon::Normal; > + const bool selected = (opt.state & QStyle::State_Selected); > + QIcon::Mode mode = selected ? QIcon::Selected : QIcon::Normal; > QIcon icon = index.model()->data(index, > Qt::DecorationRole).value<QIcon>(); > QPixmap pm = icon.pixmap(m_iconSize, m_iconSize, mode); > QPoint point(isLTR ? opt.rect.left() + s_lateralMargin : > opt.rect.right() - s_lateralMargin - m_iconSize, > @@ -196,7 +196,7 @@ void KFilePlacesViewDelegate::paint(QPainter *painter, > const QStyleOptionViewIte > if (!actionIcon.isNull()) { > const int iconSize = actionIconSize(); > QIcon::Mode mode = QIcon::Normal; > - if (selectedAndActive) { > + if (selected) { > mode = QIcon::Selected; > } else if (m_hoveredAction == index) { > mode = QIcon::Active; > @@ -230,7 +230,7 @@ void KFilePlacesViewDelegate::paint(QPainter *painter, > const QStyleOptionViewIte > } > } > > - if (selectedAndActive) { > + if (selected) { > painter->setPen(opt.palette.highlightedText().color()); > } else { > painter->setPen(opt.palette.text().color()); > @@ -266,7 +266,7 @@ void KFilePlacesViewDelegate::paint(QPainter *painter, > const QStyleOptionViewIte > QColor capacityBgColor(opt.palette.color(QPalette::WindowText)); > capacityBgColor.setAlphaF(0.2 * capacityBgColor.alphaF()); > > - QColor capacityFgColor(selectedAndActive ? > opt.palette.color(cg, QPalette::HighlightedText) : opt.palette.color(cg, > QPalette::Highlight)); > + QColor capacityFgColor(selected ? opt.palette.color(cg, > QPalette::HighlightedText) : opt.palette.color(cg, QPalette::Highlight)); > if (usedSpace > 0.95) { > if (!m_warningCapacityBarColor.isValid()) { > m_warningCapacityBarColor = KColorScheme(cg, > KColorScheme::View).foreground(KColorScheme::NegativeText).color(); If you would like you can contribute to to KDE easily. Here is a guideline. Any help is more than welcome -- You are receiving this mail because: You are watching all bug changes.
