From 97d8a116fb94a6b64d83bf533162c41b7b3769ee Mon Sep 17 00:00:00 2001 From: Nav Date: Mon, 8 May 2023 14:58:45 +0100 Subject: [PATCH] Improved rotatable label appearance with differing font renderers --- src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp | 2 +- .../UserInterfaces/InsightWindow/Widgets/RotatableLabel.cpp | 2 +- .../Stylesheets/TargetMemoryInspectionPane.qss | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index e458794d..1d07be02 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -137,7 +137,7 @@ namespace Bloom auto* targetRegisterButtonLayout = this->targetRegistersButton->findChild(); auto* registersBtnLabel = new RotatableLabel(270, "Registers", this->targetRegistersButton); registersBtnLabel->setObjectName("target-registers-btn-label"); - registersBtnLabel->setContentsMargins(4, 4, 10, 0); + registersBtnLabel->setContentsMargins(4, 4, 10, 2); targetRegisterButtonLayout->insertWidget(0, registersBtnLabel, 0, Qt::AlignTop); this->bottomMenuBar = this->container->findChild("bottom-menu-bar"); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/RotatableLabel.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/RotatableLabel.cpp index 57b04bdf..6eb276a6 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/RotatableLabel.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/RotatableLabel.cpp @@ -37,7 +37,7 @@ namespace Bloom::Widgets } else if (this->angle % 90 == 0) { size.setHeight(textSize.width()); - size.setWidth(textSize.height()); + size.setWidth(this->width()); } else { auto angle = this->angle; diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Stylesheets/TargetMemoryInspectionPane.qss b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Stylesheets/TargetMemoryInspectionPane.qss index 1f8adf57..ec93b3fc 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Stylesheets/TargetMemoryInspectionPane.qss +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Stylesheets/TargetMemoryInspectionPane.qss @@ -88,7 +88,7 @@ } #target-memory-inspection-pane #rh-side-bar #manage-memory-snapshots-btn #label { - qproperty-bottomMargin: 4; + qproperty-bottomMargin: 2; color: #999a9d; }