Mercurial > octave
changeset 28768:bffd48bb4b8c
fix indentation of cset b075aa252ca7
* resource-manager.cc (get_default_font_family): increase code indent
of code lines added in cset b075aa252ca7
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Tue, 22 Sep 2020 17:19:46 +0200 |
parents | b075aa252ca7 |
children | 903fe321649b |
files | libgui/src/resource-manager.cc |
diffstat | 1 files changed, 19 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/resource-manager.cc Tue Sep 22 16:13:25 2020 +0200 +++ b/libgui/src/resource-manager.cc Tue Sep 22 17:19:46 2020 +0200 @@ -222,30 +222,30 @@ QString default_family; #if defined (Q_OS_MAC) - // Use hard coded default on macOS, since selection of fixed width - // default font is unreliable (see bug #59128). + // Use hard coded default on macOS, since selection of fixed width + // default font is unreliable (see bug #59128). - // Get all available fixed width fonts via a font combobox - QFontComboBox font_combo_box; - font_combo_box.setFontFilters (QFontComboBox::MonospacedFonts); - QStringList fonts; + // Get all available fixed width fonts via a font combobox + QFontComboBox font_combo_box; + font_combo_box.setFontFilters (QFontComboBox::MonospacedFonts); + QStringList fonts; - for (int index = 0; index < font_combo_box.count(); index++) - fonts << font_combo_box.itemText(index); + for (int index = 0; index < font_combo_box.count(); index++) + fonts << font_combo_box.itemText(index); - // Test for macOS default fixed width font - if (fonts.contains (global_mono_font.def.toString ())) - default_family = global_mono_font.def.toString (); + // Test for macOS default fixed width font + if (fonts.contains (global_mono_font.def.toString ())) + default_family = global_mono_font.def.toString (); #endif - // If default font is still empty (on all other platforms or - // if macOS default font is not available): use QFontDatabase - if (default_family.isEmpty ()) - { - // Get the system's default monospaced font - QFont fixed_font = QFontDatabase::systemFont (QFontDatabase::FixedFont); - default_family = fixed_font.defaultFamily (); - } + // If default font is still empty (on all other platforms or + // if macOS default font is not available): use QFontDatabase + if (default_family.isEmpty ()) + { + // Get the system's default monospaced font + QFont fixed_font = QFontDatabase::systemFont (QFontDatabase::FixedFont); + default_family = fixed_font.defaultFamily (); + } // Test env variable which has preference std::string env_default_family = sys::env::getenv ("OCTAVE_DEFAULT_FONT");