From cd62b9a50696ba15b2aa89fc07f4c3ca91bb3cca Mon Sep 17 00:00:00 2001 From: Marco Bubke <marco.bubke@nokia.com> Date: Mon, 12 Apr 2010 21:00:10 +0200 Subject: [PATCH] Disable anchors in the feedback pane Reviewed-by: kkoehne --- .../formeditor/formeditorgraphicsview.cpp | 68 ------------------- 1 file changed, 68 deletions(-) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.cpp index 72b657616a5..1b5ad3fe0c9 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.cpp @@ -147,8 +147,6 @@ void FormEditorGraphicsView::drawForeground(QPainter *painter, const QRectF &/*r painter->setPen(Qt::black); int height = 40; - if (m_feedbackNode.instanceHasAnchors()) - height += 36; painter->drawRoundedRect(QRect(-1, -1, 100, height), 5, 5); painter->restore(); @@ -228,72 +226,6 @@ void FormEditorGraphicsView::drawForeground(QPainter *painter, const QRectF &/*r } - - if (m_feedbackNode.instanceHasAnchors()) { - if (m_beginTopMargin != m_feedbackNode.instanceValue("anchors.leftMargin")) - painter->setPen(changeColor); - else if (m_feedbackNode.anchors().instanceHasAnchor(AnchorLine::Left)) - painter->setPen(Qt::yellow); - else - painter->setPen(Qt::black); - - painter->drawText(QPoint(2.0, 48.0), QString("l:")); - painter->drawText(QPoint(14.0, 48.0), m_feedbackNode.instanceValue("anchors.leftMargin").toString()); - - - if (m_beginRightMargin != m_feedbackNode.instanceValue("anchors.rightMargin")) - painter->setPen(changeColor); - else if (m_feedbackNode.anchors().instanceHasAnchor(AnchorLine::Right)) - painter->setPen(Qt::yellow); - else - painter->setPen(Qt::black); - - painter->drawText(QPoint(50.0, 48.0), QString("r:")); - painter->drawText(QPoint(60.0, 48.0), m_feedbackNode.instanceValue("anchors.rightMargin").toString()); - - - if (m_beginTopMargin != m_feedbackNode.instanceValue("anchors.topMargin")) - painter->setPen(changeColor); - else if (m_feedbackNode.anchors().instanceHasAnchor(AnchorLine::Top)) - painter->setPen(Qt::yellow); - else - painter->setPen(Qt::black); - - painter->drawText(QPoint(2.0, 60.0), QString("t:")); - painter->drawText(QPoint(14.0, 60.0), m_feedbackNode.instanceValue("anchors.topMargin").toString()); - - - if (m_beginBottomMargin != m_feedbackNode.instanceValue("anchors.bottomMargin")) - painter->setPen(changeColor); - else if (m_feedbackNode.anchors().instanceHasAnchor(AnchorLine::Bottom)) - painter->setPen(Qt::yellow); - else - painter->setPen(Qt::black); - - painter->drawText(QPoint(50.0, 60.0), QString("b:")); - painter->drawText(QPoint(60.0, 60.0), m_feedbackNode.instanceValue("anchors.bottomMargin").toString()); - - if (m_beginTopMargin != m_feedbackNode.instanceValue("anchors.horizontalCenterOffset")) - painter->setPen(changeColor); - else if (m_feedbackNode.anchors().instanceHasAnchor(AnchorLine::HorizontalCenter)) - painter->setPen(Qt::yellow); - else - painter->setPen(Qt::black); - painter->drawText(QPoint(2.0, 72.0), QString("h:")); - painter->drawText(QPoint(14.0, 72.0), m_feedbackNode.instanceValue("anchors.horizontalCenterOffset").toString()); - - - if (m_beginBottomMargin != m_feedbackNode.instanceValue("anchors.verticalCenterOffset")) - painter->setPen(changeColor); - else if (m_feedbackNode.anchors().instanceHasAnchor(AnchorLine::VerticalCenter)) - painter->setPen(Qt::yellow); - else - painter->setPen(Qt::black); - - painter->drawText(QPoint(50.0, 72.0), QString("v:")); - painter->drawText(QPoint(60.0, 72.0), m_feedbackNode.instanceValue("anchors.verticalCenterOffset").toString()); - } - painter->restore(); } -- GitLab