Truncated pin names in Insight window and added tooltip for access to full pin names.
This commit is contained in:
@@ -27,9 +27,15 @@ PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor,
|
|||||||
this->pinDirectionLabel->setObjectName("target-pin-direction");
|
this->pinDirectionLabel->setObjectName("target-pin-direction");
|
||||||
this->pinDirectionLabel->setAlignment(Qt::AlignmentFlag::AlignCenter);
|
this->pinDirectionLabel->setAlignment(Qt::AlignmentFlag::AlignCenter);
|
||||||
|
|
||||||
|
auto pinName = QString::fromStdString(pinDescriptor.name).toUpper();
|
||||||
this->pinNameLabel = new QLabel(this);
|
this->pinNameLabel = new QLabel(this);
|
||||||
this->pinNameLabel->setObjectName("target-pin-name");
|
this->pinNameLabel->setObjectName("target-pin-name");
|
||||||
this->pinNameLabel->setText(QString::fromStdString(pinDescriptor.name).toUpper());
|
this->pinNameLabel->setToolTip(pinName);
|
||||||
|
if (pinName.size() > 4) {
|
||||||
|
pinName.truncate(4);
|
||||||
|
pinName.append('.');
|
||||||
|
}
|
||||||
|
this->pinNameLabel->setText(pinName);
|
||||||
this->pinNameLabel->setAlignment(Qt::AlignmentFlag::AlignCenter);
|
this->pinNameLabel->setAlignment(Qt::AlignmentFlag::AlignCenter);
|
||||||
|
|
||||||
this->pinNumberLabel = new QLabel(this);
|
this->pinNumberLabel = new QLabel(this);
|
||||||
@@ -56,4 +62,3 @@ PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor,
|
|||||||
|
|
||||||
connect(this->bodyWidget, &PinBodyWidget::clicked, this, &TargetPinWidget::onWidgetBodyClicked);
|
connect(this->bodyWidget, &PinBodyWidget::clicked, this, &TargetPinWidget::onWidgetBodyClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,10 +29,14 @@ PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor,
|
|||||||
this->pinDirectionLabel->setObjectName("target-pin-direction");
|
this->pinDirectionLabel->setObjectName("target-pin-direction");
|
||||||
this->pinDirectionLabel->setAlignment(Qt::AlignmentFlag::AlignCenter);
|
this->pinDirectionLabel->setAlignment(Qt::AlignmentFlag::AlignCenter);
|
||||||
|
|
||||||
|
auto pinName = QString::fromStdString(pinDescriptor.name).toUpper();
|
||||||
this->pinNameLabel = new QLabel(this);
|
this->pinNameLabel = new QLabel(this);
|
||||||
this->pinNameLabel->setObjectName("target-pin-name");
|
this->pinNameLabel->setObjectName("target-pin-name");
|
||||||
auto pinName = QString::fromStdString(pinDescriptor.name).toUpper();
|
this->pinNameLabel->setToolTip(pinName);
|
||||||
pinName.truncate(5);
|
if (pinName.size() > 5) {
|
||||||
|
pinName.truncate(5);
|
||||||
|
pinName.append('.');
|
||||||
|
}
|
||||||
this->pinNameLabel->setText(pinName);
|
this->pinNameLabel->setText(pinName);
|
||||||
this->pinNameLabel->setAlignment(Qt::AlignmentFlag::AlignCenter);
|
this->pinNameLabel->setAlignment(Qt::AlignmentFlag::AlignCenter);
|
||||||
|
|
||||||
@@ -95,4 +99,3 @@ PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor,
|
|||||||
|
|
||||||
connect(this->bodyWidget, &PinBodyWidget::clicked, this, &TargetPinWidget::onWidgetBodyClicked);
|
connect(this->bodyWidget, &PinBodyWidget::clicked, this, &TargetPinWidget::onWidgetBodyClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user