@@ -64,6 +64,7 @@ NetworkEditor::NetworkEditor(boost::shared_ptr<CurrentModuleSelection> moduleSel
6464 PreexecuteFunc preexecuteFunc,
6565 TagColorFunc tagColor,
6666 TagNameFunc tagName,
67+ double highResolutionExpandFactor,
6768 QWidget* parent)
6869 : QGraphicsView(parent),
6970 modulesSelectedByCL_(false ),
@@ -80,11 +81,13 @@ NetworkEditor::NetworkEditor(boost::shared_ptr<CurrentModuleSelection> moduleSel
8081 moduleEventProxy_(new ModuleEventProxy),
8182 zLevelManager_(new ZLevelManager(scene_)),
8283 fileLoading_(false ),
83- preexecute_(preexecuteFunc)
84+ preexecute_(preexecuteFunc),
85+ highResolutionExpandFactor_(highResolutionExpandFactor)
8486{
8587 scene_->setBackgroundBrush (Qt::darkGray);
8688 ModuleWidget::connectionFactory_.reset (new ConnectionFactory (scene_));
8789 ModuleWidget::closestPortFinder_.reset (new ClosestPortFinder (scene_));
90+ ModuleWidget::highResolutionExpandFactor_ = highResolutionExpandFactor_;
8891
8992 setScene (scene_);
9093 setDragMode (RubberBandDrag);
@@ -378,15 +381,15 @@ void NetworkEditor::setupModuleWidget(ModuleWidget* module)
378381 proxy->createPortPositionProviders ();
379382 proxy->highlightPorts (Preferences::Instance ().highlightPorts ? 1 : 0 );
380383
381- auto expand = Core::Application::Instance ().parameters ()->developerParameters ()->guiExpandFactor ().get_value_or (-1 );
382-
383- if (expand > 0 )
384+ if (highResolutionExpandFactor_ > 1 )
384385 {
385- qDebug () << " expand factor:" << expand;
386- qDebug () << proxy->size ();
387- module ->setFixedHeight (proxy->size ().height () * expand);
388- proxy->setMaximumHeight (proxy->size ().height () * expand);
389- qDebug () << proxy->size ();
386+ // qDebug() << "module widget expand factor:" << highResolutionExpandFactor_;
387+ // qDebug() << proxy->size();
388+ module ->setFixedHeight (proxy->size ().height () * highResolutionExpandFactor_);
389+ proxy->setMaximumHeight (proxy->size ().height () * highResolutionExpandFactor_);
390+ module ->setFixedWidth (proxy->size ().width () * std::max (highResolutionExpandFactor_*0.9 , 1.0 ));
391+ proxy->setMaximumWidth (proxy->size ().width () * std::max (highResolutionExpandFactor_*0.9 , 1.0 ));
392+ // qDebug() << proxy->size();
390393 }
391394
392395 scene_->addItem (proxy);
0 commit comments