From bea1af7e0bbf3e98a0d5c682eea78c63d902c456 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 11 Mar 2023 21:10:38 +0000 Subject: [PATCH] Changed snapshot SvgToolButton to a standard tool button with a rotated label --- .../Images/manage-snapshots-icon.svg | 36 +++--- .../TargetMemoryInspectionPane.qss | 19 +++- .../TargetMemoryInspectionPane.cpp | 4 +- .../TargetMemoryInspectionPane.hpp | 3 +- .../UiFiles/TargetMemoryInspectionPane.ui | 107 ++++++++++++++---- 5 files changed, 121 insertions(+), 48 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Images/manage-snapshots-icon.svg b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Images/manage-snapshots-icon.svg index a5877bb7..ed8520bb 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Images/manage-snapshots-icon.svg +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Images/manage-snapshots-icon.svg @@ -2,7 +2,7 @@ @@ -54,21 +50,19 @@ + id="layer1"> + id="rect1537" + style="fill:#838382;fill-opacity:1;stroke-width:0.202557" + d="M 0.52916668,0.52916668 V 3.4395833 H 1.3229167 v -0.79375 h 1.3229166 v 0.79375 h 0.79375 V 0.52916668 Z M 1.0583333,1.0583333 H 2.9104167 V 2.1166666 H 1.0583333 Z" /> diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Stylesheets/TargetMemoryInspectionPane.qss b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Stylesheets/TargetMemoryInspectionPane.qss index e7feb61b..ce150cd0 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Stylesheets/TargetMemoryInspectionPane.qss +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Stylesheets/TargetMemoryInspectionPane.qss @@ -35,9 +35,7 @@ } #target-memory-inspection-pane #top-bar QToolButton, -#target-memory-inspection-pane #bottom-bar QToolButton, -#target-memory-inspection-pane #lh-side-bar QToolButton, -#target-memory-inspection-pane #rh-side-bar QToolButton { +#target-memory-inspection-pane #bottom-bar QToolButton { background-color: transparent; border: none; padding: 0; @@ -211,13 +209,22 @@ /* Snapshot Manager */ #target-memory-inspection-pane #rh-side-bar #manage-memory-snapshots-btn { - border-bottom: 1px solid #41423f; - qproperty-buttonWidth: 31; - qproperty-buttonHeight: 28; + border: none; +} + +#target-memory-inspection-pane #rh-side-bar #manage-memory-snapshots-btn #icon { + +} + +#target-memory-inspection-pane #rh-side-bar #manage-memory-snapshots-btn #label { + qproperty-bottomMargin: 4; + color: #999a9d; + } #target-memory-inspection-pane #rh-side-bar #manage-memory-snapshots-btn:hover { background-color: #2F2F2D; + border: none; } #target-memory-inspection-pane #rh-side-bar #manage-memory-snapshots-btn:checked { diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp index a3c50ce3..4552b55f 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp @@ -80,7 +80,7 @@ namespace Bloom::Widgets this->subContainerLayout = this->container->findChild("container-sub-layout"); this->manageMemoryRegionsButton = this->container->findChild("manage-memory-regions-btn"); - this->manageMemorySnapshotsButton = this->container->findChild("manage-memory-snapshots-btn"); + this->manageMemorySnapshotsButton = this->container->findChild("manage-memory-snapshots-btn"); this->refreshButton = this->container->findChild("refresh-memory-btn"); this->refreshOnTargetStopAction = this->refreshButton->findChild("refresh-target-stopped"); @@ -89,6 +89,8 @@ namespace Bloom::Widgets this->detachPaneButton = this->container->findChild("detach-pane-btn"); this->attachPaneButton = this->container->findChild("attach-pane-btn"); + this->manageMemorySnapshotsButton->layout()->setContentsMargins(0, 0, 0, 0); + auto* memoryCapacityLabel = this->container->findChild("memory-capacity-label"); memoryCapacityLabel->setText(QLocale(QLocale::English).toString(this->targetMemoryDescriptor.size()) + " Bytes"); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.hpp index 5c2958cc..0c4f1174 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "src/Insight/UserInterfaces/InsightWindow/Widgets/PaneWidget.hpp" @@ -57,7 +58,7 @@ namespace Bloom::Widgets QWidget* titleBar = nullptr; SvgToolButton* manageMemoryRegionsButton = nullptr; - SvgToolButton* manageMemorySnapshotsButton = nullptr; + QToolButton* manageMemorySnapshotsButton = nullptr; SvgToolButton* refreshButton = nullptr; QAction* refreshOnTargetStopAction = nullptr; diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/UiFiles/TargetMemoryInspectionPane.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/UiFiles/TargetMemoryInspectionPane.ui index cb2aa9bb..931e7786 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/UiFiles/TargetMemoryInspectionPane.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/UiFiles/TargetMemoryInspectionPane.ui @@ -183,10 +183,10 @@ - 32 + 23 - 32 + 23 @@ -221,35 +221,21 @@ - 32 + 23 - 32 + 23 - 3 + 0 0 - - - - - true - - - :/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Images/manage-snapshots-icon.svg - - - Manage Memory Snapshots - - - @@ -257,6 +243,89 @@ + + + + + 22 + + + 22 + + + 100 + + + true + + + Manage Memory Snapshots + + + + + 0 + + + 0 + + + + + + 8 + + + + QSizePolicy::Fixed + + + + + + + 15 + + + 22 + + + :/compiled/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Images/manage-snapshots-icon.svg + + + + + + + + 4 + + + + QSizePolicy::Fixed + + + + + + + 90 + + + Snapshots + + + + + + + Qt::Vertical + + + + + +