diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.cpp index dfd11213..79de3515 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.cpp @@ -1,7 +1,7 @@ #include "RegisterHistoryItem.hpp" #include -#include +#include #include using namespace Bloom::Widgets; @@ -24,15 +24,20 @@ RegisterHistoryItem::RegisterHistoryItem( ).toHex()).toUpper()); this->valueLabel->setObjectName("value-label"); - auto labelLayout = new QVBoxLayout(); - labelLayout->setSpacing(5); - labelLayout->setContentsMargins(0, 0, 0, 0); - labelLayout->addWidget(this->dateLabel, 0, Qt::AlignmentFlag::AlignTop); - labelLayout->addWidget(this->valueLabel, 0, Qt::AlignmentFlag::AlignTop); - labelLayout->addStretch(1); + this->descriptionLayout->setText("Register Written"); + this->descriptionLayout->setObjectName("description-label"); - this->layout->setSpacing(1); - this->layout->addLayout(labelLayout); + auto subLabelLayout = new QHBoxLayout(); + subLabelLayout->setSpacing(0); + subLabelLayout->setContentsMargins(0, 0, 0, 0); + subLabelLayout->addWidget(this->valueLabel, 0, Qt::AlignmentFlag::AlignLeft); + subLabelLayout->addStretch(1); + subLabelLayout->addWidget(this->descriptionLayout, 0, Qt::AlignmentFlag::AlignRight); + + this->layout->setSpacing(5); + this->layout->addWidget(this->dateLabel, 0, Qt::AlignmentFlag::AlignTop); + this->layout->addLayout(subLabelLayout); + this->layout->addStretch(1); auto onClick = [this] { this->setSelected(true); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.hpp index 90d64d69..50606a7f 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include "Item.hpp" @@ -11,9 +11,10 @@ namespace Bloom::Widgets class RegisterHistoryItem: public Item { Q_OBJECT - QHBoxLayout* layout = new QHBoxLayout(this); + QVBoxLayout* layout = new QVBoxLayout(this); QLabel* dateLabel = new QLabel(this); QLabel* valueLabel = new QLabel(this); + QLabel* descriptionLayout = new QLabel(this); public: RegisterHistoryItem( diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/Stylesheets/TargetRegisterInspectorWindow.qss b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/Stylesheets/TargetRegisterInspectorWindow.qss index 8868a178..849feb2f 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/Stylesheets/TargetRegisterInspectorWindow.qss +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/Stylesheets/TargetRegisterInspectorWindow.qss @@ -111,6 +111,11 @@ QPushButton:disabled { color: #8a8a8d; } +#target-register-history-widget #register-history-item #description-label { + font-size: 13px; + color: #8a8a8d; +} + #target-register-history-widget #separator-label { /*font-style: italic;*/ color: #8a8a8d;