From db91383a9e36e7bc87e1da20924800347aed91da Mon Sep 17 00:00:00 2001 From: dreg_fr33project Date: Fri, 12 Sep 2014 06:33:17 +0200 Subject: [PATCH] registers view new scroll area and new size for big symbol names, more registers in one tab etc.. --- x64_dbg_gui/Project/Src/Gui/CPUWidget.cpp | 7 +++++-- x64_dbg_gui/Project/Src/Gui/RegistersView.cpp | 3 ++- x64_dbg_gui/Project/Src/Gui/RegistersView.h | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/x64_dbg_gui/Project/Src/Gui/CPUWidget.cpp b/x64_dbg_gui/Project/Src/Gui/CPUWidget.cpp index aaa7acdf..a97a3e0f 100644 --- a/x64_dbg_gui/Project/Src/Gui/CPUWidget.cpp +++ b/x64_dbg_gui/Project/Src/Gui/CPUWidget.cpp @@ -32,10 +32,13 @@ CPUWidget::CPUWidget(QWidget* parent) : QWidget(parent), ui(new Ui::CPUWidget) connect(mDisas, SIGNAL(selectionChanged(int_t)), mInfo, SLOT(disasmSelectionChanged(int_t))); mGeneralRegs = new RegistersView(0); + mGeneralRegs->setFixedWidth(1000); + + QScrollArea* scrollArea = new QScrollArea; + scrollArea->setWidget(mGeneralRegs); - //TODO: add more tabs mRegsTab = new QTabWidget(this); - mRegsTab->addTab(mGeneralRegs, "General"); + mRegsTab->addTab(scrollArea, "General"); ui->mTopRightFrameLayout->addWidget(mRegsTab); diff --git a/x64_dbg_gui/Project/Src/Gui/RegistersView.cpp b/x64_dbg_gui/Project/Src/Gui/RegistersView.cpp index dbc47a0e..0f9015ab 100644 --- a/x64_dbg_gui/Project/Src/Gui/RegistersView.cpp +++ b/x64_dbg_gui/Project/Src/Gui/RegistersView.cpp @@ -3,7 +3,8 @@ #include "Configuration.h" #include "WordEditDialog.h" -RegistersView::RegistersView(QWidget* parent) : QAbstractScrollArea(parent), mVScrollOffset(0) + +RegistersView::RegistersView(QWidget* parent) : QScrollArea(parent), mVScrollOffset(0) { // precreate ContextMenu Actions wCM_Increment = new QAction(tr("Increment"), this); diff --git a/x64_dbg_gui/Project/Src/Gui/RegistersView.h b/x64_dbg_gui/Project/Src/Gui/RegistersView.h index 67819267..7c6c71fb 100644 --- a/x64_dbg_gui/Project/Src/Gui/RegistersView.h +++ b/x64_dbg_gui/Project/Src/Gui/RegistersView.h @@ -1,7 +1,7 @@ #ifndef REGISTERSVIEW_H #define REGISTERSVIEW_H -#include +#include #include #include #include "Bridge.h" @@ -13,7 +13,7 @@ namespace Ui class RegistersView; } -class RegistersView : public QAbstractScrollArea +class RegistersView : public QScrollArea { Q_OBJECT