summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp
diff options
context:
space:
mode:
authorEmptyChaos <EmptyChaos@users.noreply.github.com>2016-10-03 07:29:50 +0000
committerEmptyChaos <EmptyChaos@users.noreply.github.com>2016-10-04 13:47:22 +1100
commit27d295ec7e456240d97327b3c4351d3e168c479f (patch)
tree535b5771a2d0151dac92c5eedcd6d25695f073de /Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp
parentf39c301579a5a88caa7cb4cea9e6d44f7d4c94df (diff)
WX: HiDPI: FrameAUI / Debugger
Changes: - MemoryWindow was cleaned up and gives more feedback on searches. Some bugs were fixed as well: - A complex bug that allowed tearing off tabs and opening multiple copies of a debug panel which lead to segfaults - Another segfault related to right-click menus on code/memory views when those tools were floating in their own window.
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp
index 133e563fea..881add3f9d 100644
--- a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp
+++ b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp
@@ -2,6 +2,8 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <array>
+
// clang-format off
#include <wx/bitmap.h>
#include <wx/aui/framemanager.h>
@@ -32,11 +34,15 @@ public:
: DolphinAuiToolBar(parent, id, wxDefaultPosition, wxDefaultSize,
wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_TEXT)
{
- SetToolBitmapSize(wxSize(24, 24));
+ wxSize bitmap_size = FromDIP(wxSize(24, 24));
+ SetToolBitmapSize(bitmap_size);
- m_Bitmaps[Toolbar_Delete] = WxUtils::LoadResourceBitmap("toolbar_debugger_delete");
- m_Bitmaps[Toolbar_Add_BP] = WxUtils::LoadResourceBitmap("toolbar_add_breakpoint");
- m_Bitmaps[Toolbar_Add_MC] = WxUtils::LoadResourceBitmap("toolbar_add_memorycheck");
+ static const std::array<const char* const, Num_Bitmaps> image_names{
+ {"toolbar_debugger_delete", "toolbar_add_breakpoint", "toolbar_add_memorycheck"}};
+ for (std::size_t i = 0; i < image_names.size(); ++i)
+ m_Bitmaps[i] =
+ WxUtils::LoadScaledResourceBitmap(image_names[i], this, bitmap_size, wxDefaultSize,
+ WxUtils::LSI_SCALE_DOWN | WxUtils::LSI_ALIGN_CENTER);
AddTool(ID_DELETE, _("Delete"), m_Bitmaps[Toolbar_Delete]);
Bind(wxEVT_TOOL, &CBreakPointWindow::OnDelete, parent, ID_DELETE);
@@ -84,8 +90,6 @@ CBreakPointWindow::CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent
const wxSize& size, long style)
: wxPanel(parent, id, position, size, style, title), m_pCodeWindow(_pCodeWindow)
{
- Bind(wxEVT_CLOSE_WINDOW, &CBreakPointWindow::OnClose, this);
-
m_mgr.SetManagedWindow(this);
m_mgr.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE);
@@ -108,15 +112,9 @@ CBreakPointWindow::~CBreakPointWindow()
m_mgr.UnInit();
}
-void CBreakPointWindow::OnClose(wxCloseEvent& event)
-{
- SaveAll();
- event.Skip();
-}
-
void CBreakPointWindow::NotifyUpdate()
{
- m_BreakPointListView->Update();
+ m_BreakPointListView->Repopulate();
}
void CBreakPointWindow::OnDelete(wxCommandEvent& WXUNUSED(event))