summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-08-03 04:56:21 -0400
committerLioncash <mathew1800@gmail.com>2015-09-26 22:46:57 -0400
commit457a398c3361439e50180fa20d04d623315b0fda (patch)
tree9740136d02c1dddb659ebf035fd9b1aa55652de8 /Source/Core/DolphinWX/Debugger/MemoryWindow.cpp
parent5aa19ad051e5ff0ef75f2e12d1af9589f3d6b18e (diff)
MemoryWindow: Adjust control alignment
Aligns controls so that their widths remain the same with one another
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/MemoryWindow.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/MemoryWindow.cpp39
1 files changed, 21 insertions, 18 deletions
diff --git a/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp b/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp
index eb6487148c..a23eda647f 100644
--- a/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp
+++ b/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp
@@ -67,9 +67,6 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, long style, const wxString& name)
: wxPanel(parent, id, pos, size, style, name)
{
- wxBoxSizer* sizerBig = new wxBoxSizer(wxHORIZONTAL);
- wxBoxSizer* sizerRight = new wxBoxSizer(wxVERTICAL);
-
DebugInterface* di = &PowerPC::debug_interface;
memview = new CMemoryView(di, this);
@@ -81,37 +78,43 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
valbox = new wxTextCtrl(this, IDM_VALBOX, "", wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);
valbox->Bind(wxEVT_TEXT_ENTER, &CMemoryWindow::SetMemoryValueFromValBox, this);
- sizerBig->Add(memview, 20, wxEXPAND);
- sizerBig->Add(sizerRight, 0, wxEXPAND | wxALL, 3);
- sizerRight->Add(addrbox);
- sizerRight->Add(valbox);
- sizerRight->Add(new wxButton(this, IDM_SETVALBUTTON, _("Set Value")));
-
- sizerRight->AddSpacer(5);
- sizerRight->Add(new wxButton(this, IDM_DUMP_MEMORY, _("Dump MRAM")));
- sizerRight->Add(new wxButton(this, IDM_DUMP_MEM2, _("Dump EXRAM")));
+ wxGridSizer* const search_sizer = new wxGridSizer(1);
+ search_sizer->Add(addrbox);
+ search_sizer->Add(valbox, 0, wxEXPAND);
+ search_sizer->Add(new wxButton(this, IDM_SETVALBUTTON, _("Set Value")));
+ wxGridSizer* const dump_sizer = new wxGridSizer(1);
+ dump_sizer->Add(new wxButton(this, IDM_DUMP_MEMORY, _("Dump MRAM")), 0, wxEXPAND);
+ dump_sizer->Add(new wxButton(this, IDM_DUMP_MEM2, _("Dump EXRAM")), 0, wxEXPAND);
if (!SConfig::GetInstance().bMMU)
- sizerRight->Add(new wxButton(this, IDM_DUMP_FAKEVMEM, _("Dump FakeVMEM")));
-
- wxStaticBoxSizer* sizerSearchType = new wxStaticBoxSizer(wxVERTICAL, this, _("Search"));
+ dump_sizer->Add(new wxButton(this, IDM_DUMP_FAKEVMEM, _("Dump FakeVMEM")), 0, wxEXPAND);
+ wxStaticBoxSizer* const sizerSearchType = new wxStaticBoxSizer(wxVERTICAL, this, _("Search"));
sizerSearchType->Add(btnSearch = new wxButton(this, IDM_SEARCH, _("Search")));
sizerSearchType->Add(chkAscii = new wxCheckBox(this, IDM_ASCII, "Ascii "));
sizerSearchType->Add(chkHex = new wxCheckBox(this, IDM_HEX, _("Hex")));
- sizerRight->Add(sizerSearchType);
- wxStaticBoxSizer* sizerDataTypes = new wxStaticBoxSizer(wxVERTICAL, this, _("Data Type"));
+ wxStaticBoxSizer* const sizerDataTypes = new wxStaticBoxSizer(wxVERTICAL, this, _("Data Type"));
sizerDataTypes->SetMinSize(74, 40);
sizerDataTypes->Add(chk8 = new wxCheckBox(this, IDM_U8, "U8"));
sizerDataTypes->Add(chk16 = new wxCheckBox(this, IDM_U16, "U16"));
sizerDataTypes->Add(chk32 = new wxCheckBox(this, IDM_U32, "U32"));
+
+ wxBoxSizer* const sizerRight = new wxBoxSizer(wxVERTICAL);
+ sizerRight->Add(search_sizer);
+ sizerRight->AddSpacer(5);
+ sizerRight->Add(dump_sizer);
+ sizerRight->Add(sizerSearchType);
sizerRight->Add(sizerDataTypes);
+
+ wxBoxSizer* const sizerBig = new wxBoxSizer(wxHORIZONTAL);
+ sizerBig->Add(memview, 20, wxEXPAND);
+ sizerBig->Add(sizerRight, 0, wxEXPAND | wxALL, 3);
+
SetSizer(sizerBig);
chkHex->SetValue(1); //Set defaults
chk8->SetValue(1);
- //sizerLeft->Fit(this);
sizerRight->Fit(this);
sizerBig->Fit(this);
}