Debugger: Make the register list DPI aware

This commit is contained in:
Ty Lamontagne 2021-11-05 01:31:13 -04:00 committed by refractionpcsx2
parent 4442b798c9
commit 74f3bb2aa9
2 changed files with 4 additions and 3 deletions

View File

@ -74,8 +74,8 @@ CtrlRegisterList::CtrlRegisterList(wxWindow* parent, DebugInterface* _cpu)
SetDoubleBuffered(true);
const wxSize optSize = getOptimalSize();
SetVirtualSize(optSize);
SetScrollbars(1, rowHeight, optSize.x, optSize.y / rowHeight, 0, 0);
SetVirtualSize(optSize.x,optSize.y);
SetScrollbars(1, rowHeight, optSize.x, optSize.y * MSW_GetDPIScale() / rowHeight, 0, 0);
}
CtrlRegisterList::~CtrlRegisterList()

View File

@ -16,6 +16,7 @@
#pragma once
#include <wx/wx.h>
#include "gui/MSWstuff.h" // Required for MSW_GetDPIScale()
#include "DebugTools/DebugInterface.h"
#include "DebugTools/DisassemblyManager.h"
@ -38,7 +39,7 @@ public:
if (GetWindowStyle() & wxVSCROLL)
optimalSize.x += wxSystemSettings::GetMetric(wxSYS_VSCROLL_X);
return wxSize(optimalSize.x, 0);
return wxSize(optimalSize.x * MSW_GetDPIScale(), 0);
}
virtual wxSize DoGetBestClientSize() const