From 798dfb113fc2627cb7c4c52f898fc3d0518dbfc8 Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Wed, 11 May 2016 17:36:22 +0200 Subject: [PATCH] Don't antialias bitmap images (=> screenshots now look quite a bit better) --- src/domain/UBGraphicsPixmapItem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/domain/UBGraphicsPixmapItem.cpp b/src/domain/UBGraphicsPixmapItem.cpp index a2191321..522a9cb6 100644 --- a/src/domain/UBGraphicsPixmapItem.cpp +++ b/src/domain/UBGraphicsPixmapItem.cpp @@ -120,12 +120,16 @@ void UBGraphicsPixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) void UBGraphicsPixmapItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + painter->setRenderHint(QPainter::Antialiasing, false); + // Never draw the rubber band, we draw our custom selection with the DelegateFrame QStyleOptionGraphicsItem styleOption = QStyleOptionGraphicsItem(*option); styleOption.state &= ~QStyle::State_Selected; QGraphicsPixmapItem::paint(painter, &styleOption, widget); Delegate()->postpaint(painter, option, widget); + + painter->setRenderHint(QPainter::Antialiasing, true); }