From 401883e69706723fe5719d3f13bd6401046138e0 Mon Sep 17 00:00:00 2001 From: jcid Date: Sun, 23 Dec 2007 23:15:13 +0100 Subject: Made dialogs use font_factor (e.g. view source). --- src/dialog.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/dialog.cc') diff --git a/src/dialog.cc b/src/dialog.cc index d3dfc214..08316d7d 100644 --- a/src/dialog.cc +++ b/src/dialog.cc @@ -11,6 +11,8 @@ // UI dialogs +#include // for rint() + #include // for the unfortunate (temporary?) event key testing #include #include @@ -24,6 +26,7 @@ #include "dialog.hh" #include "misc.h" #include "uicmd.hh" +#include "prefs.h" using namespace fltk; @@ -113,6 +116,10 @@ void a_Dialog_text_window(const char *txt, const char *title) /* enable wrapping lines; text uses entire width of window */ td->wrap_mode(true, 0); + /* 11.0 instead of 12.0 because the dialog's font is a bit bigger */ + td->textsize((int) rint(11.0 * prefs.font_factor)); + fltk::setfont(td->textfont(), td->textsize()); + lines = td->total_lines(); line_num_width = 2; while (lines /= 10) -- cgit v1.2.3