mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Added ability to show song cover in HistoryView and Overview::Layout.
This commit is contained in:
@@ -343,7 +343,8 @@ const QPixmap &Image::pixBlurredSingle(
|
||||
int outerw,
|
||||
int outerh,
|
||||
ImageRoundRadius radius,
|
||||
RectParts corners) const {
|
||||
RectParts corners,
|
||||
const style::color *colored) const {
|
||||
if (w <= 0 || !width() || !height()) {
|
||||
w = width() * cIntRetinaFactor();
|
||||
} else {
|
||||
@@ -365,11 +366,14 @@ const QPixmap &Image::pixBlurredSingle(
|
||||
} else if (radius == ImageRoundRadius::Ellipse) {
|
||||
options |= Option::Circled | cornerOptions(corners);
|
||||
}
|
||||
if (colored) {
|
||||
options |= Option::Colored;
|
||||
}
|
||||
|
||||
auto k = SinglePixKey(options);
|
||||
auto i = _cache.find(k);
|
||||
if (i == _cache.cend() || i->second.width() != (outerw * cIntRetinaFactor()) || i->second.height() != (outerh * cIntRetinaFactor())) {
|
||||
auto p = pixNoCache(w, h, options, outerw, outerh);
|
||||
auto p = pixNoCache(w, h, options, outerw, outerh, colored);
|
||||
p.setDevicePixelRatio(cRetinaFactor());
|
||||
i = _cache.emplace_or_assign(k, p).first;
|
||||
}
|
||||
|
Reference in New Issue
Block a user