diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.cpp index 1580f30a..5257e06a 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.cpp @@ -64,7 +64,7 @@ namespace Bloom::Widgets int containerWidth = this->width(); constexpr int charWidth = 6; auto labelWidth = static_cast(charWidth * byteHex.size()) + 13; - auto width = (containerWidth - (BitWidget::WIDTH) - labelWidth) / 2; + auto width = containerWidth - BitWidget::WIDTH; painter.drawLine(QLine( BitWidget::WIDTH / 2, @@ -88,17 +88,17 @@ namespace Bloom::Widgets )); painter.drawLine(QLine( - static_cast((BitWidget::WIDTH / 2) + width + labelWidth), + static_cast((BitWidget::WIDTH / 2) + (width / 2)), BitWidget::HEIGHT + BitsetWidget::VALUE_GRAPHIC_HEIGHT, - containerWidth - (BitWidget::WIDTH / 2) - 1, - BitWidget::HEIGHT + BitsetWidget::VALUE_GRAPHIC_HEIGHT + static_cast((BitWidget::WIDTH / 2) + (width / 2)), + BitWidget::HEIGHT + BitsetWidget::VALUE_GRAPHIC_HEIGHT + 4 )); painter.setPen(QColor("#8a8a8d")); painter.drawText( QRect( - static_cast((BitWidget::WIDTH / 2) + width), - BitWidget::HEIGHT + BitsetWidget::VALUE_GRAPHIC_HEIGHT - (labelHeight / 2), + static_cast((BitWidget::WIDTH / 2) + (width / 2) - (labelWidth / 2)), + BitWidget::HEIGHT + BitsetWidget::VALUE_GRAPHIC_HEIGHT + 7, labelWidth, labelHeight ), diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.hpp index 571dfaa3..27615135 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.hpp @@ -16,8 +16,8 @@ namespace Bloom::Widgets Q_OBJECT public: - static constexpr int VALUE_GRAPHIC_HEIGHT = 20; - static constexpr int HEIGHT = BitWidget::HEIGHT + BitsetWidget::VALUE_GRAPHIC_HEIGHT + 8; + static constexpr int VALUE_GRAPHIC_HEIGHT = 6; + static constexpr int HEIGHT = BitWidget::HEIGHT + BitsetWidget::VALUE_GRAPHIC_HEIGHT + 20; static constexpr int WIDTH = (BitWidget::WIDTH + BitWidget::SPACING) * 8; BitsetWidget(int byteNumber, unsigned char& byte, bool readOnly, QWidget* parent);