Corrected pin body size handing within target widgets

This commit is contained in:
Nav
2021-10-23 12:41:29 +01:00
parent 3802cc11f6
commit 077127315c
3 changed files with 13 additions and 9 deletions

View File

@@ -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;

View File

@@ -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);