From 49cc084cc5370edb080bcc1f98a8b48a6f730d0d Mon Sep 17 00:00:00 2001 From: cristian64 Date: Wed, 29 May 2024 21:09:31 +0100 Subject: [PATCH] Use the system's fixed-width font in the **Memory Viewer** dialog for all platforms. Previously, the system-defined, fixed-width font was used only for macOS; now the font is used on Windows and Linux too, as opposed to using some hardcoded font families that may not be available in the system. --- Source/GUI/MemViewer/MemViewer.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Source/GUI/MemViewer/MemViewer.cpp b/Source/GUI/MemViewer/MemViewer.cpp index 8b661ad..88bd641 100644 --- a/Source/GUI/MemViewer/MemViewer.cpp +++ b/Source/GUI/MemViewer/MemViewer.cpp @@ -372,15 +372,9 @@ void MemViewer::updateFontSize(int newSize) { m_memoryFontSize = newSize; -#ifdef __linux__ - setFont(QFont("Monospace", m_memoryFontSize)); -#elif _WIN32 - setFont(QFont("Courier New", m_memoryFontSize)); -#elif __APPLE__ QFont fixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont); fixedFont.setPointSize(m_memoryFontSize); setFont(fixedFont); -#endif m_charWidthEm = fontMetrics().horizontalAdvance(QLatin1Char('M')); m_charHeight = fontMetrics().height();