- painter->setClipRect(option->exposedRect);
- painter->setPen(pen);
- //painter->setClipRect(option->exposedRect);
- painter->drawPath(resultClipPath);
-
- if (m_hover && br.width() > 30) {
- painter->setBrush(QColor(180, 180, 50, 180)); //gradient);
-
- // draw transitions handles
- QPainterPath transitionHandle;
- const int handle_size = 4;
- transitionHandle.moveTo(0, 0);
- transitionHandle.lineTo(handle_size, handle_size);
- transitionHandle.lineTo(handle_size * 2, 0);
- transitionHandle.lineTo(handle_size * 3, handle_size);
- transitionHandle.lineTo(handle_size * 2, handle_size * 2);
- transitionHandle.lineTo(handle_size * 3, handle_size * 3);
- transitionHandle.lineTo(0, handle_size * 3);
- transitionHandle.closeSubpath();
- int pointy = (int)(br.y() + br.height() / 2);
- int pointx1 = (int)(br.x() + 10);
- int pointx2 = (int)(br.x() + br.width() - (10 + handle_size * 3));
-#if 0
- painter->setPen(QPen(Qt::black));
- painter->setBrush(QBrush(QColor(50, 50, 0)));
-#else
- /*QRadialGradient gradient(pointx1 + 5, pointy + 5 , 5, 2, 2);
- gradient.setColorAt(0.2, Qt::white);
- gradient.setColorAt(0.8, Qt::yellow);
- gradient.setColorAt(1, Qt::black);*/
-
-#endif
- painter->translate(pointx1, pointy);
- painter->drawPath(transitionHandle); //Ellipse(0, 0 , 10, 10);
- painter->translate(-pointx1, -pointy);
-
- /* QRadialGradient gradient1(pointx2 + 5, pointy + 5 , 5, 2, 2);
- gradient1.setColorAt(0.2, Qt::white);
- gradient1.setColorAt(0.8, Qt::yellow);
- gradient1.setColorAt(1, Qt::black);
- painter->setBrush(gradient1);*/
- painter->translate(pointx2, pointy);
- QMatrix m;
- m.scale(-1.0, 1.0);
- //painter->setMatrix(m);
- painter->drawPath(transitionHandle); // Ellipse(0, 0, 10, 10);
- //painter->setMatrix(m);
- painter->translate(- pointx2, -pointy);
- }
+ // expand clip rect to allow correct painting of clip border
+
+ exposed.setRight(exposed.right() + xoffset + 0.5);
+ exposed.setBottom(exposed.bottom() + 1);
+ painter->setClipRect(exposed);
+
+ frameColor.setAlpha(alphaBase);
+ painter->setPen(frameColor);
+ QLineF line(br.left() + xoffset, br.top(), br.right() - xoffset, br.top());
+ painter->drawLine(line);
+
+ frameColor.setAlpha(alphaBase * 2);
+ painter->setPen(frameColor);
+ line.setLine(br.right(), br.top() + 1.0, br.right(), br.bottom() - 1.0);
+ painter->drawLine(line);
+ line.setLine(br.right() - xoffset, br.bottom(), br.left() + xoffset, br.bottom());
+ painter->drawLine(line);
+ line.setLine(br.left(), br.bottom() - 1.0, br.left(), br.top() + 1.0);
+ painter->drawLine(line);
+
+ painter->setPen(QColor(255, 255, 255, 60));
+ line.setLine(br.right() - xoffset, br.bottom() - 1.0, br.left() + xoffset, br.bottom() - 1.0);
+ painter->drawLine(line);
+ //painter->drawRect(br);