Changeset View
Changeset View
Standalone View
Standalone View
lib/paintutils.cpp
Context not available. | |||||
22 | #include <math.h> | 22 | #include <math.h> | ||
---|---|---|---|---|---|
23 | 23 | | |||
24 | // Qt | 24 | // Qt | ||
25 | #include <QApplication> | ||||
25 | #include <QPainter> | 26 | #include <QPainter> | ||
26 | #include <QPainterPath> | 27 | #include <QPainterPath> | ||
27 | #include <QPixmap> | 28 | #include <QPixmap> | ||
Context not available. | |||||
51 | 52 | | |||
52 | QPixmap generateFuzzyRect(const QSize& size, const QColor& color, int radius) | 53 | QPixmap generateFuzzyRect(const QSize& size, const QColor& color, int radius) | ||
53 | { | 54 | { | ||
54 | QPixmap pix(size); | 55 | qreal dpr = qApp->devicePixelRatio(); | ||
56 | QPixmap pix(size * dpr); | ||||
57 | pix.setDevicePixelRatio(dpr); | ||||
55 | const QColor transparent(0, 0, 0, 0); | 58 | const QColor transparent(0, 0, 0, 0); | ||
56 | pix.fill(transparent); | 59 | pix.fill(transparent); | ||
57 | 60 | | |||
Context not available. |