From b1e4a2b044cc20efb0732122ea921fcd7c0df02d Mon Sep 17 00:00:00 2001 From: Syres916 <46537884+Syres916@users.noreply.github.com> Date: Tue, 7 Oct 2025 13:33:01 +0100 Subject: [PATCH] [Gui] fix the Preferences tree font --- src/Gui/ReportView.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Gui/ReportView.cpp b/src/Gui/ReportView.cpp index d158ec4e46..db849041b6 100644 --- a/src/Gui/ReportView.cpp +++ b/src/Gui/ReportView.cpp @@ -463,8 +463,19 @@ ReportOutput::~ReportOutput() void ReportOutput::restoreFont() { - QFont serifFont = QFontDatabase::systemFont(QFontDatabase::FixedFont); - setFont(serifFont); + QFont font; + auto hPrefGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Editor"); + int fontSize = hPrefGrp->GetInt("FontSize", 10); + auto serifFont = hPrefGrp->GetASCII("Font"); + if (serifFont.empty()) { + font = QFontDatabase::systemFont(QFontDatabase::FixedFont); + font.setPointSize(fontSize); + } + else { + font = QFont (QString::fromStdString(serifFont), fontSize); + } + setFont(font); } void ReportOutput::sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level,