mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-20 15:24:14 +02:00
move position of element editor coord display to center of statusbar
for better visibility only
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
#include <QActionGroup>
|
||||
#include <QFileDialog>
|
||||
#include <QSvgGenerator>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
/**
|
||||
* @brief QETElementEditor::QETElementEditor
|
||||
@@ -1200,7 +1201,18 @@ void QETElementEditor::initGui()
|
||||
//Live cursor position readout, in the same scene coordinates as the parts' X/Y properties
|
||||
m_position_label = new QLabel(this);
|
||||
m_position_label->setMinimumWidth(120);
|
||||
statusBar()->addPermanentWidget(m_position_label);
|
||||
|
||||
// Layout
|
||||
QHBoxLayout *coordDisplayLayout = new QHBoxLayout();
|
||||
coordDisplayLayout->setContentsMargins(0, 0, 0, 0);
|
||||
coordDisplayLayout->addWidget(m_position_label);
|
||||
coordDisplayLayout->addStretch();
|
||||
// Widget
|
||||
QWidget *coordDisplay = new QWidget;
|
||||
coordDisplay->setLayout(coordDisplayLayout);
|
||||
|
||||
statusBar()->addPermanentWidget(coordDisplay);
|
||||
|
||||
connect(m_elmt_scene, &ElementScene::mouseMoved, this, [this](const QPointF &pos) {
|
||||
m_position_label->setText(tr("X: %1 Y: %2")
|
||||
.arg(pos.x(), 0, 'f', 1)
|
||||
|
||||
Reference in New Issue
Block a user