summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/CodeView.cpp
diff options
context:
space:
mode:
authorEmptyChaos <EmptyChaos@users.noreply.github.com>2016-10-04 08:17:46 +0000
committerEmptyChaos <EmptyChaos@users.noreply.github.com>2016-10-04 19:17:47 +1100
commit94aff7e47e5291f8eef3a25885f43ccfb19db1c3 (patch)
tree8fc73c2bdd2833a88ddf176d9847a136e351f39e /Source/Core/DolphinWX/Debugger/CodeView.cpp
parent7b29b3c5711b5bdd41dd65f315f7bcb850637957 (diff)
WxDebugger: Fix variable width fonts in Code/Memory views
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/CodeView.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/CodeView.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/Debugger/CodeView.cpp b/Source/Core/DolphinWX/Debugger/CodeView.cpp
index 8bc07036b3..4b5c8e1a87 100644
--- a/Source/Core/DolphinWX/Debugger/CodeView.cpp
+++ b/Source/Core/DolphinWX/Debugger/CodeView.cpp
@@ -390,8 +390,9 @@ void CCodeView::OnPaint(wxPaintEvent& event)
{
wxFontMetrics metrics = paint_dc.GetFontMetrics();
char_width = metrics.averageWidth;
- if (metrics.height > m_rowHeight)
- m_rowHeight = metrics.height;
+ m_rowHeight = std::max(metrics.height, m_rowHeight);
+ if (!DebuggerFont.IsFixedWidth())
+ char_width = paint_dc.GetTextExtent("mxx").GetWidth() / 3; // (1em + 2ex) / 3
}
std::unique_ptr<wxGraphicsContext> ctx(wxGraphicsContext::Create(paint_dc));