New attach & detach buttons for memory inspection panes

This commit is contained in:
Nav
2022-07-16 19:10:32 +01:00
parent e35fc3e8f2
commit 4c3083e992
7 changed files with 248 additions and 3 deletions

View File

@@ -98,6 +98,8 @@ qt_add_resources(
"./UserInterfaces/InsightWindow/Images/refresh.svg" "./UserInterfaces/InsightWindow/Images/refresh.svg"
"./UserInterfaces/InsightWindow/Images/refresh-disabled.svg" "./UserInterfaces/InsightWindow/Images/refresh-disabled.svg"
"./UserInterfaces/InsightWindow/Images/down-arrow.svg" "./UserInterfaces/InsightWindow/Images/down-arrow.svg"
"./UserInterfaces/InsightWindow/Images/detach-pane-icon.svg"
"./UserInterfaces/InsightWindow/Images/attach-pane-icon.svg"
"./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/collapse-all.svg" "./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/collapse-all.svg"
"./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/expand-all.svg" "./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/expand-all.svg"
"./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/arrow.svg" "./UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/arrow.svg"

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="23"
height="15"
viewBox="0 0 6.0854168 3.96875"
version="1.1"
id="svg974"
sodipodi:docname="attach-pane-icon.svg"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs968" />
<sodipodi:namedview
id="base"
pagecolor="#343532"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="64"
inkscape:cx="14.359375"
inkscape:cy="6.8203125"
inkscape:document-units="px"
inkscape:current-layer="layer2"
inkscape:document-rotation="0"
showgrid="false"
units="px"
inkscape:snap-page="true"
inkscape:window-width="3440"
inkscape:window-height="1353"
inkscape:window-x="2560"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:snap-smooth-nodes="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:pagecheckerboard="0" />
<metadata
id="metadata971">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Main"
style="display:inline">
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:#838382;stroke-width:0.529166;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1537-3-6-4-3-7-3"
width="2.9104173"
height="2.3812506"
x="1.5874997"
y="0.79374969" />
<rect
style="display:inline;fill:#838382;fill-opacity:1;stroke:none;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1537-3-6-4-3-7-3-6"
width="3.175"
height="1.3229166"
x="1.4552084"
y="2.1166668" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:none;stroke-width:0.546629;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1537-3-6-4-3-6"
width="2.8929155"
height="1.8345821"
x="1.7780014"
y="1.5369283" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="23"
height="15"
viewBox="0 0 6.0854168 3.96875"
version="1.1"
id="svg974"
sodipodi:docname="float-pane-icon.svg"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs968" />
<sodipodi:namedview
id="base"
pagecolor="#343532"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="16"
inkscape:cx="-0.3125"
inkscape:cy="-1"
inkscape:document-units="px"
inkscape:current-layer="layer2"
inkscape:document-rotation="0"
showgrid="false"
units="px"
inkscape:snap-page="true"
inkscape:window-width="3440"
inkscape:window-height="1353"
inkscape:window-x="2560"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:snap-smooth-nodes="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:pagecheckerboard="0" />
<metadata
id="metadata971">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Main"
style="display:inline">
<path
id="rect1537-3-6-4"
style="display:inline;fill:#838382;fill-opacity:1;stroke-width:0.199231;stroke-miterlimit:4;stroke-dasharray:none"
d="M 1.3229168,1.3229167 V 3.4395834 H 3.9687502 V 2.9104168 H 1.8520835 V 1.3229167 Z" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:#838382;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1537-3-6-4-3-7"
width="2.1166663"
height="1.5874996"
x="2.3812501"
y="0.79375017" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:none;stroke-width:0.546629;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1537-3-6-4-3-6"
width="2.8929155"
height="1.8345821"
x="1.5962507"
y="1.5962507" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -332,6 +332,10 @@ QScrollBar::sub-line:vertical {
} }
/* Target Memory Inspection Pane */ /* Target Memory Inspection Pane */
#target-memory-inspection-pane {
background-color: #373835;
}
#target-memory-inspection-pane #title-bar { #target-memory-inspection-pane #title-bar {
background-color: #383F43; background-color: #383F43;
border-bottom: 1px solid #2F2F2D; border-bottom: 1px solid #2F2F2D;
@@ -345,7 +349,12 @@ QScrollBar::sub-line:vertical {
border-right: 1px solid #41423f; border-right: 1px solid #41423f;
} }
#target-memory-inspection-pane #lh-side-bar QToolButton { #target-memory-inspection-pane #rh-side-bar {
border-left: 1px solid #41423f;
}
#target-memory-inspection-pane #lh-side-bar QToolButton,
#target-memory-inspection-pane #rh-side-bar QToolButton {
background-color: transparent; background-color: transparent;
border: none; border: none;
padding: 0; padding: 0;
@@ -353,7 +362,8 @@ QScrollBar::sub-line:vertical {
qproperty-buttonHeight: 21; qproperty-buttonHeight: 21;
} }
#target-memory-inspection-pane #lh-side-bar QToolButton:hover { #target-memory-inspection-pane #lh-side-bar QToolButton:hover,
#target-memory-inspection-pane #rh-side-bar QToolButton:hover {
background-color: #454541; background-color: #454541;
border: none; border: none;
} }
@@ -464,3 +474,9 @@ QScrollBar::sub-line:vertical {
#hex-viewer-container #graphics-view-container #address-container QLabel:disabled { #hex-viewer-container #graphics-view-container #address-container QLabel:disabled {
color: rgba(175, 177, 179, 0.3); color: rgba(175, 177, 179, 0.3);
} }
#hex-viewer-container QScrollBar:vertical {
background-color: transparent;
width: 12px;
margin: 1px 3px 1px 0px;
}

View File

@@ -59,6 +59,8 @@ namespace Bloom::Widgets
auto* subContainerLayout = this->container->findChild<QHBoxLayout*>("sub-container-layout"); auto* subContainerLayout = this->container->findChild<QHBoxLayout*>("sub-container-layout");
this->manageMemoryRegionsButton = this->container->findChild<SvgToolButton*>("manage-memory-regions-btn"); this->manageMemoryRegionsButton = this->container->findChild<SvgToolButton*>("manage-memory-regions-btn");
this->detachPaneButton = this->container->findChild<SvgToolButton*>("detach-pane-btn");
this->attachPaneButton = this->container->findChild<SvgToolButton*>("attach-pane-btn");
this->hexViewerWidget = new HexViewerWidget( this->hexViewerWidget = new HexViewerWidget(
this->targetMemoryDescriptor, this->targetMemoryDescriptor,
this->settings.hexViewerWidgetSettings, this->settings.hexViewerWidgetSettings,
@@ -69,7 +71,7 @@ namespace Bloom::Widgets
); );
this->hexViewerWidget->setDisabled(true); this->hexViewerWidget->setDisabled(true);
subContainerLayout->addWidget(this->hexViewerWidget); subContainerLayout->insertWidget(1, this->hexViewerWidget);
QObject::connect( QObject::connect(
this->manageMemoryRegionsButton, this->manageMemoryRegionsButton,

View File

@@ -50,6 +50,8 @@ namespace Bloom::Widgets
QWidget* titleBar = nullptr; QWidget* titleBar = nullptr;
SvgToolButton* manageMemoryRegionsButton = nullptr; SvgToolButton* manageMemoryRegionsButton = nullptr;
SvgToolButton* detachPaneButton = nullptr;
SvgToolButton* attachPaneButton = nullptr;
HexViewerWidget* hexViewerWidget = nullptr; HexViewerWidget* hexViewerWidget = nullptr;
Targets::TargetState targetState = Targets::TargetState::UNKNOWN; Targets::TargetState targetState = Targets::TargetState::UNKNOWN;

View File

@@ -94,6 +94,66 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item alignment="Qt::AlignLeft">
<widget class="QWidget" name="rh-side-bar">
<property name="minimumWidth">
<number>30</number>
</property>
<property name="maximumWidth">
<number>30</number>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding"/>
</property>
<layout class="QVBoxLayout" name="rh-side-bar-layout">
<property name="spacing">
<number>3</number>
</property>
<property name="margin">
<number>2</number>
</property>
<item>
<spacer name="vertical-spacer">
<property name="sizeHint">
<size>
<height>3</height>
</size>
</property>
</spacer>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="SvgToolButton" name="detach-pane-btn">
<property name="svgFilePath">
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Images/detach-pane-icon.svg</string>
</property>
<property name="toolTip">
<string>Detach Pane</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="SvgToolButton" name="attach-pane-btn">
<property name="svgFilePath">
<string>:/compiled/src/Insight/UserInterfaces/InsightWindow/Images/attach-pane-icon.svg</string>
</property>
<property name="toolTip">
<string>Attach Pane</string>
</property>
<property name="visible">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="vertical-spacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout> </layout>
</item> </item>