diff options
author | Carlo Marcelo Arenas Belón <carenas@gmail.com> | 2022-04-14 20:18:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-04-15 12:33:40 (GMT) |
commit | 072b318893a84d38a5e96a7f5a6432d474d7b5ab (patch) | |
tree | 5a055ef7e5ace4167d04bb09ffbd8698b4d9b98f /Source/QtDialog | |
parent | dd193fa3d357b7f1c2495348d58b85bb597844c5 (diff) | |
download | CMake-072b318893a84d38a5e96a7f5a6432d474d7b5ab.zip CMake-072b318893a84d38a5e96a7f5a6432d474d7b5ab.tar.gz CMake-072b318893a84d38a5e96a7f5a6432d474d7b5ab.tar.bz2 |
cmake-gui: avoid undefined font in recent macOS
Since commit 8fb74f97ef (ENH: Use fixed pitch font in output window,
2008-03-07), cmake-gui has been using a "Courier" font to print mono
spaced text in the output window, but at least in macOS 12, Courier
is no longer availablemand therefore will print the following warning
in the invoking terminal:
qt.qpa.fonts: Populating font family aliases took 175 ms. Replace uses of missing font family "Courier" with one that exists to avoid this cost.
Change it to use "Courier New" instead, which has been provided as an
automatically selected alternative in Windows and comes preinstalled
in both systems, and add a hint to pull another monospaced font if not.
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index f90b781..3c41fce 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -226,7 +226,8 @@ CMakeSetupDialog::CMakeSetupDialog() this->SourceDirectory->setCompleter(new QCMakeFileCompleter(this, true)); // fixed pitch font in output window - QFont outputFont("Courier"); + QFont outputFont("Courier New"); + outputFont.setStyleHint(QFont::Monospace); this->Output->setFont(outputFont); this->ErrorFormat.setForeground(QBrush(Qt::red)); |