Don't antialias bitmap images (=> screenshots now look quite a bit better)

preferencesAboutTextFull
Craig Watson 9 years ago
parent 81ad100610
commit 798dfb113f
  1. 4
      src/domain/UBGraphicsPixmapItem.cpp

@ -120,12 +120,16 @@ void UBGraphicsPixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void UBGraphicsPixmapItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) 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 // Never draw the rubber band, we draw our custom selection with the DelegateFrame
QStyleOptionGraphicsItem styleOption = QStyleOptionGraphicsItem(*option); QStyleOptionGraphicsItem styleOption = QStyleOptionGraphicsItem(*option);
styleOption.state &= ~QStyle::State_Selected; styleOption.state &= ~QStyle::State_Selected;
QGraphicsPixmapItem::paint(painter, &styleOption, widget); QGraphicsPixmapItem::paint(painter, &styleOption, widget);
Delegate()->postpaint(painter, option, widget); Delegate()->postpaint(painter, option, widget);
painter->setRenderHint(QPainter::Antialiasing, true);
} }

Loading…
Cancel
Save