mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Retina handling fixed in the new notifications.
This commit is contained in:
@@ -515,6 +515,7 @@ void Notification::prepareActionsCache() {
|
||||
auto actionsCacheWidth = _reply->width() + _replyPadding + fadeWidth;
|
||||
auto actionsCacheHeight = height() - actionsTop;
|
||||
auto actionsCacheImg = QImage(actionsCacheWidth * cIntRetinaFactor(), actionsCacheHeight * cIntRetinaFactor(), QImage::Format_ARGB32_Premultiplied);
|
||||
actionsCacheImg.setDevicePixelRatio(cRetinaFactor());
|
||||
actionsCacheImg.fill(st::transparent->c);
|
||||
{
|
||||
Painter p(&actionsCacheImg);
|
||||
@@ -611,6 +612,7 @@ void Notification::updateNotifyDisplay() {
|
||||
_history->peer->paintUserpicLeft(p, st::notifyPhotoSize, st::notifyPhotoPos.x(), st::notifyPhotoPos.y(), width());
|
||||
} else {
|
||||
static QPixmap icon = App::pixmapFromImageInPlace(App::wnd()->iconLarge().scaled(st::notifyPhotoSize, st::notifyPhotoSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
icon.setDevicePixelRatio(cRetinaFactor());
|
||||
p.drawPixmap(st::notifyPhotoPos.x(), st::notifyPhotoPos.y(), icon);
|
||||
}
|
||||
|
||||
|
@@ -56,11 +56,11 @@ public:
|
||||
~Manager();
|
||||
|
||||
private:
|
||||
using Notification = internal::Notification;
|
||||
friend class Notification;
|
||||
using HideAllButton = internal::HideAllButton;
|
||||
friend class HideAllButton;
|
||||
friend class internal::Notification;
|
||||
friend class internal::HideAllButton;
|
||||
friend class internal::Widget;
|
||||
using Notification = internal::Notification;
|
||||
using HideAllButton = internal::HideAllButton;
|
||||
|
||||
void doUpdateAll() override;
|
||||
void doShowNotification(HistoryItem *item, int forwardedCount) override;
|
||||
|
Reference in New Issue
Block a user