summaryrefslogtreecommitdiff
path: root/src/dialog.cc
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2007-12-23 23:15:13 +0100
committerjcid <devnull@localhost>2007-12-23 23:15:13 +0100
commit401883e69706723fe5719d3f13bd6401046138e0 (patch)
tree6e30f67c2630a532fb0914454114918a16a76459 /src/dialog.cc
parent516941cbf21ce901e39b63fd0fba2e254a17c00e (diff)
Made dialogs use font_factor (e.g. view source).
Diffstat (limited to 'src/dialog.cc')
-rw-r--r--src/dialog.cc7
1 files changed, 7 insertions, 0 deletions
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 <math.h> // for rint()
+
#include <fltk/events.h> // for the unfortunate (temporary?) event key testing
#include <fltk/Window.h>
#include <fltk/ask.h>
@@ -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)