Commits

Ian Chen committed 770c049

Set overlay widget attribute

  • Participants
  • Parent commits c60f6d2
  • Branches ian-building

Comments (0)

Files changed (4)

File gazebo/gui/images/rotate_object.png

Old
Old image
New
New image

File gazebo/gui/model_editor/BuildingEditorWidget.cc

   this->setObjectName("buildingEditorWidget");
 
   QPixmap rotatePixmap(":/images/rotate_object.png");
-  rotatePixmap = rotatePixmap.scaledToHeight(25);
-  rotatePixmap = rotatePixmap.scaledToWidth(25);
+//  rotatePixmap = rotatePixmap.scaledToHeight(25);
+//  rotatePixmap = rotatePixmap.scaledToWidth(25);
   rotateCursor = QCursor(rotatePixmap);
 
   EditorView *view = new EditorView();
 //  proxyWidget->setPos(QPointF(-levelWidget->width() / 2, 0));
 
   this->scaleWidget = new ScaleWidget(this);
-  this->scaleWidget->resize(250,50);
+  this->scaleWidget->resize(150,50);
 
   canvasLayout->setContentsMargins(0, 0, 0, 0);
   this->setLayout(canvasLayout);

File gazebo/gui/model_editor/LevelWidget.cc

     boost::bind(&LevelWidget::OnDiscard, this)));
 
   this->setLayout(levelLayout);
+
+  this->setAttribute(Qt::WA_TransparentForMouseEvents);
 }
 
 //////////////////////////////////////////////////

File gazebo/gui/model_editor/ScaleWidget.cc

   this->setObjectName("scaleWidget");
   this->scaleText = "1.00 m";
 
+  this->setAttribute(Qt::WA_TransparentForMouseEvents);
   this->connections.push_back(
     gui::editor::Events::ConnectChangeZoom(
     boost::bind(&ScaleWidget::OnChangeZoom, this, _1)));
 
    QPainter painter(this);
    QPen rulerPen;
+   rulerPen.setColor(Qt::gray);
    rulerPen.setWidth(3);
    painter.setPen(rulerPen);
    painter.drawLine(topLeft.x(), midPoint.y(), bottomRight.x(), midPoint.y());