Debugger: Inspect tool - changes made to highlight on selection
authorSimjees Abraham <simjees.abraham@nokia.com>
Wed, 11 Apr 2012 10:56:25 +0000 (12:56 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 11 Apr 2012 11:34:04 +0000 (13:34 +0200)
Changes made for the display of highlight on selection such that the
highlight is more prominent.

Change-Id: Iaf06bd04095be7b25881681e3f81c0fbf87df205
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>

src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp

index da95993..082f8e8 100644 (file)
@@ -90,6 +90,14 @@ void HoverHighlight::paint(QPainter *painter)
 
 void SelectionHighlight::paint(QPainter *painter)
 {
+    if (height() >= 10 && width() >= 10) {
+        QColor colorHighlight = Qt::green;
+
+        painter->fillRect(QRectF(0, 0, width(), 5), colorHighlight);
+        painter->fillRect(QRectF(0, height()-5, width(), 5), colorHighlight);
+        painter->fillRect(QRectF(0, 5, 5, height() - 10), colorHighlight);
+        painter->fillRect(QRectF(width()-5, 5, 5, height() - 10), colorHighlight);
+    }
     painter->setPen(QPen(QColor(0, 22, 159)));
     painter->drawRect(QRect(1, 1, width() - 3, height() - 3));
     painter->setPen(QColor(158, 199, 255));