diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp index fbe8d9f9..a02b4554 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp @@ -28,14 +28,16 @@ DualInlinePackageWidget::DualInlinePackageWidget( this->pinWidgets.reserve(targetVariant.pinDescriptorsByNumber.size()); this->layout = new QVBoxLayout(); - this->layout->setSpacing(8); + this->layout->setSpacing(PinWidget::WIDTH_SPACING); this->layout->setContentsMargins(0, 0, 0, 0); this->topPinLayout = new QHBoxLayout(); - this->topPinLayout->setSpacing(PinWidget::WIDTH_SPACING); + this->topPinLayout->setSpacing(0); this->topPinLayout->setDirection(QBoxLayout::Direction::RightToLeft); + this->topPinLayout->setAlignment(Qt::AlignmentFlag::AlignHCenter); this->bottomPinLayout = new QHBoxLayout(); - this->bottomPinLayout->setSpacing(PinWidget::WIDTH_SPACING); + this->bottomPinLayout->setSpacing(0); + this->bottomPinLayout->setAlignment(Qt::AlignmentFlag::AlignHCenter); for (const auto& [targetPinNumber, targetPinDescriptor]: targetVariant.pinDescriptorsByNumber) { auto pinWidget = new PinWidget(targetPinDescriptor, targetVariant, insightWorker, this); @@ -44,7 +46,7 @@ DualInlinePackageWidget::DualInlinePackageWidget( if (targetPinNumber <= (targetVariant.pinDescriptorsByNumber.size() / 2)) { this->bottomPinLayout->addWidget(pinWidget, 0, Qt::AlignmentFlag::AlignHCenter); } else { - this->topPinLayout->addWidget(pinWidget, 0, Qt::AlignmentFlag::AlignRight); + this->topPinLayout->addWidget(pinWidget, 0, Qt::AlignmentFlag::AlignHCenter); } } @@ -55,18 +57,18 @@ DualInlinePackageWidget::DualInlinePackageWidget( this->setLayout(this->layout); const auto bodyWidgetWidth = ((PinWidget::MINIMUM_WIDTH + PinWidget::WIDTH_SPACING) - * static_cast(this->pinWidgets.size() / 2)) - PinWidget::WIDTH_SPACING + 46; + * static_cast(this->pinWidgets.size() / 2)) + 46; const auto bodyWidgetHeight = 150; const auto width = bodyWidgetWidth; - const auto height = (PinWidget::MAXIMUM_HEIGHT * 2) + bodyWidgetHeight + (8 * 3); + const auto height = (PinWidget::MAXIMUM_HEIGHT * 2) + bodyWidgetHeight + (PinWidget::WIDTH_SPACING * 2); - this->bodyWidget->setGeometry(0, PinWidget::MAXIMUM_HEIGHT + 8, width, bodyWidgetHeight); + this->bodyWidget->setGeometry(0, PinWidget::MAXIMUM_HEIGHT + PinWidget::WIDTH_SPACING, width, bodyWidgetHeight); this->topPinLayout->setGeometry(QRect(0, 0, width, PinWidget::MAXIMUM_HEIGHT)); this->bottomPinLayout->setGeometry( QRect( 0, - (PinWidget::MAXIMUM_HEIGHT + bodyWidgetHeight + (8 * 2)), + (PinWidget::MAXIMUM_HEIGHT + bodyWidgetHeight + (PinWidget::WIDTH_SPACING * 2)), width, PinWidget::MAXIMUM_HEIGHT ) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp index 57d4094a..306f45fd 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp @@ -22,7 +22,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Qfp static const int MAXIMUM_LABEL_WIDTH = PinBodyWidget::WIDTH; static const int MAXIMUM_LABEL_HEIGHT = 20; static const int MAXIMUM_HORIZONTAL_WIDTH = PinBodyWidget::HEIGHT - + ((PinWidget::MAXIMUM_LABEL_WIDTH + 12) * (PinWidget::MAXIMUM_LABEL_COUNT - 1)) - 12; + + ((PinWidget::MAXIMUM_LABEL_WIDTH + 15) * (PinWidget::MAXIMUM_LABEL_COUNT - 1)) - 15; static const int MAXIMUM_HORIZONTAL_HEIGHT = PinBodyWidget::WIDTH; static const int MAXIMUM_VERTICAL_HEIGHT = PinBodyWidget::HEIGHT + ((PinWidget::MAXIMUM_LABEL_HEIGHT + 8) * PinWidget::MAXIMUM_LABEL_COUNT) - 8; diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp index b2f3cc65..5e806d5d 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp @@ -41,6 +41,7 @@ QuadFlatPackageWidget::QuadFlatPackageWidget( this->topPinLayout = new QHBoxLayout(); this->topPinLayout->setSpacing(PinWidget::WIDTH_SPACING); this->topPinLayout->setDirection(QBoxLayout::Direction::RightToLeft); + this->topPinLayout->setAlignment(Qt::AlignmentFlag::AlignHCenter); this->rightPinLayout = new QVBoxLayout(); this->rightPinLayout->setSpacing(PinWidget::WIDTH_SPACING); @@ -49,6 +50,7 @@ QuadFlatPackageWidget::QuadFlatPackageWidget( this->bottomPinLayout = new QHBoxLayout(); this->bottomPinLayout->setSpacing(PinWidget::WIDTH_SPACING); this->bottomPinLayout->setDirection(QBoxLayout::Direction::LeftToRight); + this->bottomPinLayout->setAlignment(Qt::AlignmentFlag::AlignHCenter); this->leftPinLayout = new QVBoxLayout(); this->leftPinLayout->setSpacing(PinWidget::WIDTH_SPACING);