Removed unnecessary VBoxLayout from byte item container in the hex viewier widget
This commit is contained in:
@@ -61,19 +61,15 @@ HexViewerWidget::HexViewerWidget(
|
||||
|
||||
this->hoveredAddressLabel = this->bottomBar->findChild<QLabel*>("byte-address-label");
|
||||
|
||||
auto* byteItemGraphicsViewContainer = this->container->findChild<QWidget*>("graphics-view-container");
|
||||
auto* byteItemGraphicsViewLayout = byteItemGraphicsViewContainer->findChild<QVBoxLayout*>(
|
||||
"byte-item-container-layout"
|
||||
);
|
||||
this->byteItemGraphicsViewContainer = this->container->findChild<QWidget*>("graphics-view-container");
|
||||
this->byteItemGraphicsView = new ByteItemContainerGraphicsView(
|
||||
targetMemoryDescriptor,
|
||||
insightWorker,
|
||||
this->settings,
|
||||
this->hoveredAddressLabel,
|
||||
byteItemGraphicsViewContainer
|
||||
this->byteItemGraphicsViewContainer
|
||||
);
|
||||
this->byteItemGraphicsScene = this->byteItemGraphicsView->getScene();
|
||||
byteItemGraphicsViewLayout->insertWidget(0, this->byteItemGraphicsView);
|
||||
|
||||
this->setStackMemoryHighlightingEnabled(true);
|
||||
this->setHoveredRowAndColumnHighlightingEnabled(true);
|
||||
@@ -130,6 +126,12 @@ void HexViewerWidget::resizeEvent(QResizeEvent* event) {
|
||||
this->width(),
|
||||
this->height()
|
||||
);
|
||||
|
||||
this->byteItemGraphicsView->setFixedSize(this->byteItemGraphicsViewContainer->size());
|
||||
}
|
||||
|
||||
void HexViewerWidget::showEvent(QShowEvent* event) {
|
||||
this->byteItemGraphicsView->setFixedSize(this->byteItemGraphicsViewContainer->size());
|
||||
}
|
||||
|
||||
void HexViewerWidget::onTargetStateChanged(Targets::TargetState newState) {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QEvent>
|
||||
#include <QShowEvent>
|
||||
#include <optional>
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
@@ -42,6 +43,7 @@ namespace Bloom::Widgets
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent* event) override;
|
||||
void showEvent(QShowEvent* event) override;
|
||||
|
||||
private:
|
||||
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor;
|
||||
@@ -53,6 +55,7 @@ namespace Bloom::Widgets
|
||||
QWidget* toolBar = nullptr;
|
||||
QWidget* bottomBar = nullptr;
|
||||
|
||||
QWidget* byteItemGraphicsViewContainer = nullptr;
|
||||
ByteItemContainerGraphicsView* byteItemGraphicsView = nullptr;
|
||||
ByteItemGraphicsScene* byteItemGraphicsScene = nullptr;
|
||||
QLabel* hoveredAddressLabel = nullptr;
|
||||
|
||||
@@ -121,16 +121,8 @@
|
||||
<item>
|
||||
<widget class="QWidget" name="graphics-view-container">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Ignored"/>
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="byte-item-container-layout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
Reference in New Issue
Block a user