Mercurial > octave
diff libgui/src/terminal-dock-widget.cc @ 26008:38a881b8fbec
do not use courier new as default font (bug #54086)
* gui-preferences.h: move the definition of fallback monospace font
families from resource_manager to here in case Qt does not provide
a default monospace font family;
define keys for the font of the variable editor and the console, but
without default values since the latter is provided by resource_manager
and is read later from the preferences file
* resource-manager.cc (do_get_default_font_family): new method for detecting
the default monospace font family, code is moved from do_reload_settings;
(do_reload_settings): always get the default monospace font and write it
to the preferences files as possible fallback for other console, editor etc.
* resource-manager.h: new method do_get_default_font_family
* settings-dialog.cc (settings_dialog): use new monospace font from preferences
as fallback for terminal and variable editor font
(write_lexer_settings): use new monospace font from preferences as fallback
* QTerminal.cc: include gui-preferences.h;
(notice_settings): get default monospace font from preferences file
and use it as fallback for reading the terminal front from the file
* terminal-dock-widget.cc (terminal_dock_widget): use new monospace font from
preferences as fallback
* variable-editor.cc (notice_settings): use new monospace font from
preferences as fallback
author | Torsten <mttl@mailbox.org> |
---|---|
date | Thu, 01 Nov 2018 22:10:00 +0100 |
parents | 3edae6ba1fcd |
children | 00f796120a6d |
line wrap: on
line diff
--- a/libgui/src/terminal-dock-widget.cc Thu Nov 01 13:10:23 2018 -0700 +++ b/libgui/src/terminal-dock-widget.cc Thu Nov 01 22:10:00 2018 +0100 @@ -34,6 +34,7 @@ #include "terminal-dock-widget.h" #include "resource-manager.h" +#include "gui-preferences.h" namespace octave { @@ -63,8 +64,9 @@ QFont font = QFont (); font.setStyleHint (QFont::TypeWriter); + QString default_font = settings->value (global_mono_font.key, global_mono_font.def).toString (); font.setFamily - (settings->value ("terminal/fontName", "Courier New").toString ()); + (settings->value (cs_font.key, default_font).toString ()); font.setPointSize (settings->value ("terminal/fontSize", 10).toInt ()); QFontMetrics metrics(font);