diff options
author | Marius Kintel <marius@kintel.net> | 2012-01-09 02:29:24 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-01-09 02:29:24 (GMT) |
commit | 23f6b0623c86eba96dfb1296b862522cf02b0734 (patch) | |
tree | 998500ef16763f6f08f9f7cb8917c98b1643af68 /src/Preferences.cc | |
parent | 52dfffd97ba49b603b4814d843cd9be08d040364 (diff) | |
parent | 5044ea928d72da800d11b2b80f6148265c13d10f (diff) |
Merge branch 'master' into threading
Conflicts:
RELEASE_NOTES
Diffstat (limited to 'src/Preferences.cc')
-rw-r--r-- | src/Preferences.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/Preferences.cc b/src/Preferences.cc index 4c43f2d..e05106b 100644 --- a/src/Preferences.cc +++ b/src/Preferences.cc @@ -47,16 +47,24 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent) // Setup default settings this->defaultmap["3dview/colorscheme"] = this->colorSchemeChooser->currentItem()->text(); + this->defaultmap["advanced/opencsg_show_warning"] = true; + this->defaultmap["advanced/enable_opencsg_opengl1x"] = true; + + // Setup default font (Try to use a nice monospace font) + QString fontfamily; #ifdef Q_WS_X11 - this->defaultmap["editor/fontfamily"] = "Mono"; + fontfamily = "Mono"; #elif defined (Q_WS_WIN) - this->defaultmap["editor/fontfamily"] = "Console"; + fontfamily = "Console"; #elif defined (Q_WS_MAC) - this->defaultmap["editor/fontfamily"] = "Monaco"; + fontfamily = "Monaco"; #endif + QFont font; + font.setStyleHint(QFont::TypeWriter); + font.setFamily(fontfamily); // this runs Qt's font matching algorithm + QString found_family(QFontInfo(font).family()); + this->defaultmap["editor/fontfamily"] = found_family; this->defaultmap["editor/fontsize"] = 12; - this->defaultmap["advanced/opencsg_show_warning"] = true; - this->defaultmap["advanced/enable_opencsg_opengl1x"] = true; // Toolbar QActionGroup *group = new QActionGroup(this); |