use IsabelleText font;
authorwenzelm
Mon, 07 Dec 2009 00:05:21 +0100
changeset 34749 e377d3d6910a
parent 34748 a2ed621f5f52
child 34750 8a630617faa9
use IsabelleText font; explicit <pre> element; relayout in swing thread -- paranoia mode;
src/Tools/jEdit/src/jedit/StateViewDockable.scala
--- a/src/Tools/jEdit/src/jedit/StateViewDockable.scala	Sun Dec 06 20:50:07 2009 +0100
+++ b/src/Tools/jEdit/src/jedit/StateViewDockable.scala	Mon Dec 07 00:05:21 2009 +0100
@@ -72,8 +72,7 @@
   try_file("$ISABELLE_HOME/lib/html/isabelle.css") + "\n" +
 """
 body {
-  white-space: pre;
-  font-family: IsabelleMono;
+  font-family: IsabelleText;
   font-size: 14pt;
 }
 """ +
@@ -85,7 +84,7 @@
 """)))
   }
 
-  val empty_body = XML.document_node(doc, HTML.body(Nil))
+  val empty_body = XML.document_node(doc, XML.elem(HTML.BODY))
   doc.appendChild(empty_body)
 
   panel.setDocument(doc, rcontext)
@@ -98,10 +97,16 @@
 
     val node =
       if (cmd == null) empty_body
-      else XML.document_node(doc, HTML.body(
-        cmd.results(theory_view.current_document).map((t: XML.Tree) => HTML.div(HTML.spans(t)))))
-    doc.removeChild(doc.getLastChild())
-    doc.appendChild(node)
-    panel.delayedRelayout(node.asInstanceOf[NodeImpl])
+      else {
+        val xml = XML.elem(HTML.BODY,
+          cmd.results(theory_view.current_document).
+            map((t: XML.Tree) => XML.elem(HTML.PRE, HTML.spans(t))))
+        XML.document_node(doc, xml)
+      }
+    Swing_Thread.later {
+      doc.removeChild(doc.getLastChild())
+      doc.appendChild(node)
+      panel.delayedRelayout(node.asInstanceOf[NodeImpl])
+    }
   })
 }