45{
46 Q_UNUSED(e);
47
48
49 QPainter painter(this);
50 painter.save();
51
52 painter.setRenderHint(QPainter::Antialiasing);
53 painter.setPen(Qt::transparent);
54
55
56 QPainterPath edge;
57
58 QRect viewRect =
rect();
60
61
62 QRect edgeRect = viewRect;
64
65
67
68 QColor outsideColor =
palette().base().color();
69 painter.setBrush(outsideColor);
70
71 painter.fillPath(edge, outsideColor);
72
73
74 int maxWidth = viewRect.width();
76 int innerWidth =
m_diameter - 2*thicknessPixels;
77
78 int outsideWidths = maxWidth - innerWidth - 2*thicknessPixels;
79 int outsideWidth = outsideWidths/2;
80
81
82
83 QRect leftSide = QRect(QPoint(), QPoint(thicknessPixels, viewRect.height()));
84 leftSide.translate(viewRect.topLeft());
85 QRect rightSide = leftSide;
86 leftSide.translate(outsideWidth, 0);
87 rightSide.translate(maxWidth - outsideWidth - thicknessPixels, 0);
88
89 QRect leftBottom = QRect(QPoint(leftSide.left(), leftSide.top() + leftSide.height()/2), QPoint(leftSide.bottomRight()));
90 QRect leftTop = QRect(leftSide.topLeft(), QPoint(leftSide.right(), leftSide.top() + leftSide.height()/2));
91
92 QRect rightBottom = QRect(QPoint(rightSide.left(), rightSide.top() + rightSide.height()/2), QPoint(rightSide.bottomRight()));
93 QRect rightTop = QRect(rightSide.topLeft(), QPoint(rightSide.right(), rightSide.top() + rightSide.height()/2));
94
98
101
102 painter.setBrush(Qt::transparent);
107 }
108
109 QColor crossColor = Qt::white;
110 crossColor.setAlphaF(0.4);
111 painter.setPen(crossColor);
112
113 QPointF center = viewRect.topLeft() + QPoint(viewRect.width()/2, viewRect.height()/2);
116
119
120
121 edge.clear();
122 QColor darkTransparent =
palette().dark().color();
124
125 painter.setPen(QPen(darkTransparent, 2));
127 painter.drawPath(edge);
128
129 painter.restore();
130
131}
static constexpr int m_horizontalWidgetMargins
static constexpr qreal m_crossLength
static constexpr qreal m_roundingMargin
QColor m_sampledColorBottom
static constexpr qreal m_verticalOutlineMargins
static constexpr qreal m_crossSpace
T kisGrowRect(const T &rect, U offset)
QColor blendColors(const QColor &c1, const QColor &c2, qreal r1)
rgba palette[MAX_PALETTE]