ByteViewText * byte_view_text = new ByteViewText(data, encoding, this);
byte_view_text->setAccessibleName(name);
- byte_view_text->setMonospaceFont(wsApp->monospaceFont());
+ byte_view_text->setMonospaceFont(wsApp->monospaceFont(true));
if ( tvb )
{
}
}
+const QFont WiresharkApplication::monospaceFont(bool zoomed) const
+{
+ if (zoomed) {
+ return zoomed_font_;
+ }
+ return mono_font_;
+}
+
void WiresharkApplication::setMonospaceFont(const char *font_string) {
if (font_string && strlen(font_string) > 0) {
{
// Scale by 10%, rounding to nearest half point, minimum 1 point.
// XXX Small sizes repeat. It might just be easier to create a map of multipliers.
- QFont zoomed_font_ = mono_font_;
+ zoomed_font_ = mono_font_;
qreal zoom_size = mono_font_.pointSize() * 2 * qPow(qreal(1.1), zoomLevel);
zoom_size = qRound(zoom_size) / qreal(2.0);
zoom_size = qMax(zoom_size, qreal(1.0));
void setLastOpenDir(const char *dir_name);
void setLastOpenDir(QString dir_str);
void helpTopicAction(topic_action_e action);
- const QFont monospaceFont() const { return mono_font_; }
+ const QFont monospaceFont(bool zoomed = false) const;
void setMonospaceFont(const char *font_string);
int monospaceTextSize(const char *str);
void setConfigurationProfile(const gchar *profile_name, bool write_recent = true);
bool initialized_;
bool is_reloading_lua_;
QFont mono_font_;
+ QFont zoomed_font_;
QTimer recent_timer_;
QTimer addr_resolv_timer_;
QTimer tap_update_timer_;