Commit 94e02994 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Adjust color

The rectangle that indicates selection has now the selection color.

Change-Id: I59bcd070bfb8b16f297e648ff53d83c8953b4896
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent 8c2467d4
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include <nodehints.h> #include <nodehints.h>
#include <nodemetainfo.h> #include <nodemetainfo.h>
#include <utils/theme/theme.h>
#include <QDebug> #include <QDebug>
#include <QPainter> #include <QPainter>
#include <QStyleOptionGraphicsItem> #include <QStyleOptionGraphicsItem>
...@@ -220,6 +222,7 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const ...@@ -220,6 +222,7 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const
pen.setJoinStyle(Qt::MiterJoin); pen.setJoinStyle(Qt::MiterJoin);
QColor frameColor("#AAAAAA"); QColor frameColor("#AAAAAA");
static const QColor selectionColor = Utils::creatorTheme()->color(Utils::Theme::QmlDesigner_FormEditorSelectionColor);
if (scene()->showBoundingRects()) { if (scene()->showBoundingRects()) {
pen.setColor(frameColor.darker(150)); pen.setColor(frameColor.darker(150));
...@@ -230,7 +233,7 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const ...@@ -230,7 +233,7 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const
} }
if (m_highlightBoundingRect) { if (m_highlightBoundingRect) {
pen.setColor(frameColor); pen.setColor(selectionColor);
pen.setStyle(Qt::SolidLine); pen.setStyle(Qt::SolidLine);
painter->setPen(pen); painter->setPen(pen);
painter->drawRect(m_selectionBoundingRect.adjusted(0., 0., -1., -1.)); painter->drawRect(m_selectionBoundingRect.adjusted(0., 0., -1., -1.));
......
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