Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/room/delegate/messagelistdelegate.cpp
Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Line(s) | 91 | { | |||
---|---|---|---|---|---|
107 | if (downScaled.isNull()) { | 107 | if (downScaled.isNull()) { | ||
108 | const QUrl iconUrl(iconUrlStr); | 108 | const QUrl iconUrl(iconUrlStr); | ||
109 | Q_ASSERT(iconUrl.isLocalFile()); | 109 | Q_ASSERT(iconUrl.isLocalFile()); | ||
110 | QPixmap fullScale; | 110 | QPixmap fullScale; | ||
111 | if (!fullScale.load(iconUrl.toLocalFile())) { | 111 | if (!fullScale.load(iconUrl.toLocalFile())) { | ||
112 | qCWarning(RUQOLAWIDGETS_LOG) << "Could not load" << iconUrl.toLocalFile(); | 112 | qCWarning(RUQOLAWIDGETS_LOG) << "Could not load" << iconUrl.toLocalFile(); | ||
113 | return {}; | 113 | return {}; | ||
114 | } | 114 | } | ||
115 | downScaled = fullScale.scaledToHeight(maxHeight * dpr); | 115 | downScaled = fullScale.scaledToHeight(maxHeight * dpr, Qt::SmoothTransformation); | ||
116 | downScaled.setDevicePixelRatio(dpr); | 116 | downScaled.setDevicePixelRatio(dpr); | ||
117 | cache.insertCachedPixmap(iconUrlStr, downScaled); | 117 | cache.insertCachedPixmap(iconUrlStr, downScaled); | ||
118 | } | 118 | } | ||
119 | return downScaled; | 119 | return downScaled; | ||
120 | } | 120 | } | ||
121 | 121 | | |||
122 | // [Optional date header] | 122 | // [Optional date header] | ||
123 | // [margin] <pixmap> [margin] <sender> [margin] <editicon> [margin] <text message> [margin] <add reaction> [margin] <timestamp> [margin/2] | 123 | // [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 |