Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/room/delegate/messagelistdelegate.cpp
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 98 | if (!QPixmapCache::find(iconUrlStr, &fullScale)) { | |||
---|---|---|---|---|---|
99 | const QUrl iconUrl(iconUrlStr); | 99 | const QUrl iconUrl(iconUrlStr); | ||
100 | Q_ASSERT(iconUrl.isLocalFile()); | 100 | Q_ASSERT(iconUrl.isLocalFile()); | ||
101 | if (!fullScale.load(iconUrl.toLocalFile())) { | 101 | if (!fullScale.load(iconUrl.toLocalFile())) { | ||
102 | qCWarning(RUQOLAWIDGETS_LOG) << "Could not load" << iconUrl.toLocalFile(); | 102 | qCWarning(RUQOLAWIDGETS_LOG) << "Could not load" << iconUrl.toLocalFile(); | ||
103 | return {}; | 103 | return {}; | ||
104 | } | 104 | } | ||
105 | QPixmapCache::insert(iconUrlStr, fullScale); | 105 | QPixmapCache::insert(iconUrlStr, fullScale); | ||
106 | } | 106 | } | ||
107 | downScaled = fullScale.scaledToHeight(maxHeight * dpr); | 107 | downScaled = fullScale.scaledToHeight(maxHeight * dpr, Qt::SmoothTransformation); | ||
108 | downScaled.setDevicePixelRatio(dpr); | 108 | downScaled.setDevicePixelRatio(dpr); | ||
109 | cache.insertCachedPixmap(iconUrlStr, downScaled); | 109 | cache.insertCachedPixmap(iconUrlStr, downScaled); | ||
110 | } | 110 | } | ||
111 | return downScaled; | 111 | return downScaled; | ||
112 | } | 112 | } | ||
113 | 113 | | |||
114 | // [Optional date header] | 114 | // [Optional date header] | ||
115 | // [margin] <pixmap> [margin] <sender> [margin] <editicon> [margin] <text message> [margin] <add reaction> [margin] <timestamp> [margin/2] | 115 | // [margin] <pixmap> [margin] <sender> [margin] <editicon> [margin] <text message> [margin] <add reaction> [margin] <timestamp> [margin/2] | ||
▲ Show 20 Lines • Show All 403 Lines • Show Last 20 Lines |