Commit 3bd3e94f authored by Sven Langkamp's avatar Sven Langkamp

don't cut off red rectangle at the border of the overview docker, instead paint a dashed line

parent df841b07
......@@ -196,7 +196,20 @@ void OverviewWidget::paintEvent(QPaintEvent* event)
p.drawPixmap(0, 0, m_pixmap.width(), m_pixmap.height(), m_pixmap);
p.setPen(QColor(Qt::red));
QRect r = rect().translated(-previewOrigin().toPoint());
QPolygonF outline;
outline << r.topLeft() << r.topRight() << r.bottomRight() << r.bottomLeft();
QPen pen;
pen.setColor(QColor(Qt::red));
pen.setStyle(Qt::DashLine);
p.setPen(pen);
p.drawPolygon(outline.intersected(previewPolygon()));
pen.setStyle(Qt::SolidLine);
p.setPen(pen);
p.drawPolygon(previewPolygon());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment