From b5941e8fc8bfbff7cb643474c2ba3321a4064514 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 18 Jun 2022 15:35:44 +0100 Subject: [PATCH] Style tweaks to bitset widget on register inspection Insight window --- .../BitsetWidget/BitBodyWidget.hpp | 4 ++-- .../TargetRegisterInspector/BitsetWidget/BitWidget.cpp | 8 -------- .../TargetRegisterInspector/BitsetWidget/BitWidget.hpp | 7 ++----- .../Stylesheets/TargetRegisterInspectorWindow.qss | 10 +++++----- 4 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitBodyWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitBodyWidget.hpp index dccdefb5..79328144 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitBodyWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitBodyWidget.hpp @@ -17,8 +17,8 @@ namespace Bloom::Widgets Q_OBJECT public: - static constexpr int WIDTH = 23; - static constexpr int HEIGHT = 30; + static constexpr int WIDTH = 19; + static constexpr int HEIGHT = 28; BitBodyWidget( int bitIndex, diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp index 5652ec5a..09667c6a 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp @@ -29,19 +29,11 @@ namespace Bloom::Widgets this ); - this->bitLabel = new Label("Bit", this); this->bitNumberLabel = new Label(QString::number(this->bitNumber), this); - - this->bitLabel->setObjectName("register-bit-label"); this->bitNumberLabel->setObjectName("register-bit-number-label"); - - this->bitLabel->setFixedHeight(BitWidget::LABEL_HEIGHT); this->bitNumberLabel->setFixedHeight(BitWidget::LABEL_HEIGHT); - - this->bitLabel->setAlignment(Qt::AlignmentFlag::AlignCenter); this->bitNumberLabel->setAlignment(Qt::AlignmentFlag::AlignCenter); - layout->addWidget(this->bitLabel); layout->addWidget(this->bitNumberLabel); layout->addSpacing(BitWidget::VERTICAL_SPACING); layout->addWidget(this->body); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.hpp index c45e0c2c..2abb7f2d 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.hpp @@ -24,11 +24,10 @@ namespace Bloom::Widgets public: static constexpr int LABEL_HEIGHT = 14; - static constexpr int LABEL_COUNT = 2; static constexpr int WIDTH = BitBodyWidget::WIDTH; - static constexpr int HEIGHT = BitBodyWidget::HEIGHT + (BitWidget::LABEL_HEIGHT * BitWidget::LABEL_COUNT) + static constexpr int HEIGHT = BitBodyWidget::HEIGHT + BitWidget::LABEL_HEIGHT + BitWidget::VERTICAL_SPACING; - static constexpr int SPACING = 6; + static constexpr int SPACING = 5; BitWidget( int bitIndex, @@ -48,8 +47,6 @@ namespace Bloom::Widgets bool readOnly = true; BitBodyWidget* body = nullptr; - - Label* bitLabel = nullptr; Label* bitNumberLabel = nullptr; }; } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/Stylesheets/TargetRegisterInspectorWindow.qss b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/Stylesheets/TargetRegisterInspectorWindow.qss index d3ad9ea4..89870ccb 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/Stylesheets/TargetRegisterInspectorWindow.qss +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/Stylesheets/TargetRegisterInspectorWindow.qss @@ -33,6 +33,11 @@ border: 1px solid #454C52; } +/* BitsetWidget */ +#bitset-widget { + font-size: 12px; +} + #register-bit-number-label { font-size: 12px; color: #a6a7aa; @@ -43,11 +48,6 @@ color: #8a8a8d; } -/* BitsetWidget */ -#bitset-widget { - font-size: 12px; -} - /* Actions */ #actions { border-top: 1px solid #2F2F2D;