aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-07-31 00:13:34 +0000
committerGerald Combs <gerald@wireshark.org>2012-07-31 00:13:34 +0000
commit231acd1399f7d94b8d776f030bd5163091df2a76 (patch)
tree61a925ddc7fbb323e4b04993c829ca90a9a7ef43
parent0161f2aa88b3e984a80889be410896046525b999 (diff)
Font size + hint updates for Windows.
svn path=/trunk/; revision=44148
-rw-r--r--ui/qt/monospace_font.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/ui/qt/monospace_font.cpp b/ui/qt/monospace_font.cpp
index e89f044a14..acecc6382c 100644
--- a/ui/qt/monospace_font.cpp
+++ b/ui/qt/monospace_font.cpp
@@ -61,24 +61,35 @@ font_init(void) {
// Try to pick the latest, shiniest fixed-width font for our OS.
#if defined(Q_WS_WIN)
#define DEF_FONT WIN_DEF_FONT
+#define FONT_SIZE_ADJUST 2
substitutes = QStringList() << WIN_ALT_FONTS << OSX_DEF_FONT << OSX_ALT_FONTS << X11_DEF_FONT << X11_ALT_FONTS << FALLBACK_FONTS;
#elif defined(Q_WS_MAC)
#define DEF_FONT OSX_DEF_FONT
+#define FONT_SIZE_ADJUST 0
substitutes = QStringList() << OSX_ALT_FONTS << WIN_DEF_FONT << WIN_ALT_FONTS << X11_DEF_FONT << X11_ALT_FONTS << FALLBACK_FONTS;
#else
#define DEF_FONT X11_DEF_FONT
+#define FONT_SIZE_ADJUST 0
substitutes = QStringList() << X11_ALT_FONTS << WIN_DEF_FONT << WIN_ALT_FONTS << OSX_DEF_FONT << OSX_ALT_FONTS << FALLBACK_FONTS;
#endif
m_r_font.setFamily(DEF_FONT);
m_r_font.insertSubstitutions(DEF_FONT, substitutes);
- m_r_font.setPointSize(wsApp->font().pointSize());
- m_r_font.setFixedPitch(true);
+ m_r_font.setPointSize(wsApp->font().pointSize() + FONT_SIZE_ADJUST);
+#if QT_VERSION >= 0x040700
+ m_b_font.setStyleHint(QFont::Monospace);
+ #else
+ m_b_font.setStyleHint(QFont::TypeWriter);
+ #endif
m_b_font.setFamily(DEF_FONT);
m_b_font.insertSubstitutions(DEF_FONT, substitutes);
- m_b_font.setPointSize(wsApp->font().pointSize());
- m_b_font.setFixedPitch(true);
+ m_b_font.setPointSize(wsApp->font().pointSize() + FONT_SIZE_ADJUST);
+#if QT_VERSION >= 0x040700
+ m_b_font.setStyleHint(QFont::Monospace);
+ #else
+ m_b_font.setStyleHint(QFont::TypeWriter);
+ #endif
m_b_font.setWeight(QFont::Bold);
}