summaryrefslogtreecommitdiff
path: root/fluid/CodeEditor.cxx
diff options
context:
space:
mode:
authorIan MacArthur <imacarthur@gmail.com>2012-04-13 14:45:18 +0000
committerIan MacArthur <imacarthur@gmail.com>2012-04-13 14:45:18 +0000
commit6f4c59079f97289eafc29840e3873ce08c869e71 (patch)
treebb5d0d4ce517f4faa26c4fe35b9b8ef866c6b972 /fluid/CodeEditor.cxx
parent418dd143f048cad1035803fdd7118e791fb7dd26 (diff)
This change to fluid's CodeEditor ought to make it honour textsize changes
that are applied at text buffer creation. How effective this will be for etxtsize changes that occur later is another question, but this corrects a problem identified in the thread "Re: [fltk.general] FLUID fonts earlier git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9341 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/CodeEditor.cxx')
-rw-r--r--fluid/CodeEditor.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/fluid/CodeEditor.cxx b/fluid/CodeEditor.cxx
index 864f5045f..bad97057c 100644
--- a/fluid/CodeEditor.cxx
+++ b/fluid/CodeEditor.cxx
@@ -114,6 +114,16 @@ const char * const CodeEditor::
"volatile"
};
+// attempt to make the fluid code editor widget honour textsize setting
+void CodeEditor::textsize(Fl_Fontsize s) {
+ Fl_Text_Editor::textsize(s); // call base class method
+ // now attempt to update our styletable to honour the new size...
+ int entries = sizeof(styletable) / sizeof(styletable[0]);
+ for(int iter = 0; iter < entries; iter++) {
+ styletable[iter].size = s;
+ }
+} // textsize
+
// 'compare_keywords()' - Compare two keywords...
int CodeEditor::compare_keywords(const void *a, const void *b) {