Changeset View
Changeset View
Standalone View
Standalone View
src/kitemviews/kstandarditemlistwidget.cpp
Show First 20 Lines • Show All 960 Lines • ▼ Show 20 Line(s) | 960 | if (m_pixmap.isNull()) { | |||
---|---|---|---|---|---|
961 | // Use the icon that fits to the MIME-type | 961 | // Use the icon that fits to the MIME-type | ||
962 | QString iconName = values["iconName"].toString(); | 962 | QString iconName = values["iconName"].toString(); | ||
963 | if (iconName.isEmpty()) { | 963 | if (iconName.isEmpty()) { | ||
964 | // The icon-name has not been not resolved by KFileItemModelRolesUpdater, | 964 | // The icon-name has not been not resolved by KFileItemModelRolesUpdater, | ||
965 | // use a generic icon as fallback | 965 | // use a generic icon as fallback | ||
966 | iconName = QStringLiteral("unknown"); | 966 | iconName = QStringLiteral("unknown"); | ||
967 | } | 967 | } | ||
968 | const QStringList overlays = values["iconOverlays"].toStringList(); | 968 | const QStringList overlays = values["iconOverlays"].toStringList(); | ||
969 | m_pixmap = pixmapForIcon(iconName, overlays, maxIconHeight, QIcon::Normal); | 969 | m_pixmap = pixmapForIcon(iconName, overlays, maxIconHeight, m_layout != IconsLayout && isActiveWindow() && isSelected() ? QIcon::Selected : QIcon::Normal); | ||
970 | 970 | | |||
971 | } else if (m_pixmap.width() / m_pixmap.devicePixelRatio() != maxIconWidth || m_pixmap.height() / m_pixmap.devicePixelRatio() != maxIconHeight) { | 971 | } else if (m_pixmap.width() / m_pixmap.devicePixelRatio() != maxIconWidth || m_pixmap.height() / m_pixmap.devicePixelRatio() != maxIconHeight) { | ||
972 | // A custom pixmap has been applied. Assure that the pixmap | 972 | // A custom pixmap has been applied. Assure that the pixmap | ||
973 | // is scaled to the maximum available size. | 973 | // is scaled to the maximum available size. | ||
974 | KPixmapModifier::scale(m_pixmap, QSize(maxIconWidth, maxIconHeight) * qApp->devicePixelRatio()); | 974 | KPixmapModifier::scale(m_pixmap, QSize(maxIconWidth, maxIconHeight) * qApp->devicePixelRatio()); | ||
975 | } | 975 | } | ||
976 | 976 | | |||
977 | if (m_isCut) { | 977 | if (m_isCut) { | ||
▲ Show 20 Lines • Show All 550 Lines • Show Last 20 Lines |