Skip to content
Snippets Groups Projects
Commit 121eda16 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: add borders to color widgets

parent 01d886d1
No related branches found
No related tags found
No related merge requests found
...@@ -98,14 +98,14 @@ namespace QmlDesigner { ...@@ -98,14 +98,14 @@ namespace QmlDesigner {
QPainter p(this); QPainter p(this);
int height = 120; int localHeight = 120;
if (m_cache.isNull()) { if (m_cache.isNull()) {
m_cache = QPixmap(10, height); m_cache = QPixmap(10, localHeight);
QPainter cacheP(&m_cache); QPainter cacheP(&m_cache);
for (int i = 0; i < height; i++) for (int i = 0; i < localHeight; i++)
{ {
QColor c; QColor c;
c.setHsv( (i*359) / 120.0, 255,255); c.setHsv( (i*359) / 120.0, 255,255);
...@@ -123,6 +123,10 @@ namespace QmlDesigner { ...@@ -123,6 +123,10 @@ namespace QmlDesigner {
points.append(QPointF(25, y + 5)); points.append(QPointF(25, y + 5));
points.append(QPointF(25, y - 5)); points.append(QPointF(25, y - 5));
p.setPen(Qt::black);
p.setBrush(Qt::NoBrush);
p.drawRect(QRect(0, 0, width() - 1, height() - 1).adjusted(8, 4, -18, -4));
p.setPen(Qt::black); p.setPen(Qt::black);
p.setBrush(QColor("#707070")); p.setBrush(QColor("#707070"));
p.drawPolygon(points); p.drawPolygon(points);
...@@ -185,6 +189,9 @@ namespace QmlDesigner { ...@@ -185,6 +189,9 @@ namespace QmlDesigner {
p.setPen(Qt::white); p.setPen(Qt::white);
p.drawEllipse(x - 2, y - 2, 4, 4); p.drawEllipse(x - 2, y - 2, 4, 4);
p.setPen(Qt::black);
p.drawRect(QRect(0, 0, width() - 1, height() -1).adjusted(4, 4, -4, -4));
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment