From 27d295ec7e456240d97327b3c4351d3e168c479f Mon Sep 17 00:00:00 2001 From: EmptyChaos Date: Mon, 3 Oct 2016 07:29:50 +0000 Subject: 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. --- .../Core/DolphinWX/Debugger/BreakpointWindow.cpp | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp') 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 + // clang-format off #include #include @@ -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 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)) -- cgit v1.2.3