diff --git a/src/Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/PinWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/PinWidget.cpp index 87520e82..3be0cafd 100644 --- a/src/Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/PinWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/TargetWidgets/DIP/PinWidget.cpp @@ -27,9 +27,15 @@ PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, this->pinDirectionLabel->setObjectName("target-pin-direction"); this->pinDirectionLabel->setAlignment(Qt::AlignmentFlag::AlignCenter); + auto pinName = QString::fromStdString(pinDescriptor.name).toUpper(); this->pinNameLabel = new QLabel(this); 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->pinNumberLabel = new QLabel(this); @@ -56,4 +62,3 @@ PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, connect(this->bodyWidget, &PinBodyWidget::clicked, this, &TargetPinWidget::onWidgetBodyClicked); } - diff --git a/src/Insight/UserInterfaces/InsightWindow/TargetWidgets/QFP/PinWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/TargetWidgets/QFP/PinWidget.cpp index 4ae7cec7..ab7ea67e 100644 --- a/src/Insight/UserInterfaces/InsightWindow/TargetWidgets/QFP/PinWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/TargetWidgets/QFP/PinWidget.cpp @@ -29,10 +29,14 @@ PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, this->pinDirectionLabel->setObjectName("target-pin-direction"); this->pinDirectionLabel->setAlignment(Qt::AlignmentFlag::AlignCenter); + auto pinName = QString::fromStdString(pinDescriptor.name).toUpper(); this->pinNameLabel = new QLabel(this); this->pinNameLabel->setObjectName("target-pin-name"); - auto pinName = QString::fromStdString(pinDescriptor.name).toUpper(); - pinName.truncate(5); + this->pinNameLabel->setToolTip(pinName); + if (pinName.size() > 5) { + pinName.truncate(5); + pinName.append('.'); + } this->pinNameLabel->setText(pinName); 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); } -