# HG changeset patch # User wenzelm # Date 1353860121 -3600 # Node ID 0c7b351a68716823f5a67e02e74b1270fb76bac4 # Parent b385d134926d1b712fc8a90e16180668d3c5ed01 added convenience actions isabelle.increase-font-size and isabelle.decrease-font-size; diff -r b385d134926d -r 0c7b351a6871 NEWS --- a/NEWS Sun Nov 25 15:17:01 2012 +0100 +++ b/NEWS Sun Nov 25 17:15:21 2012 +0100 @@ -82,7 +82,11 @@ * Improved editing support for control styles: subscript, superscript, bold, reset of style -- operating on single symbols or text -selections. Cf. keyboard short-cuts C+e DOWN/UP/RIGHT/LEFT. +selections. Cf. keyboard shortcuts C+e DOWN/UP/RIGHT/LEFT. + +* Actions isabelle.increase-font-size and isabelle.decrease-font-size +adjust the main text area font size, and its derivatives for output, +tooltips etc. Cf. keyboard shortcuts C-PLUS and C-MINUS. * Uniform Java 7 platform on Linux, Mac OS X, Windows: recent updates from Oracle provide better multi-platform experience. This version is diff -r b385d134926d -r 0c7b351a6871 src/Tools/jEdit/src/Isabelle.props --- a/src/Tools/jEdit/src/Isabelle.props Sun Nov 25 15:17:01 2012 +0100 +++ b/src/Tools/jEdit/src/Isabelle.props Sun Nov 25 17:15:21 2012 +0100 @@ -27,6 +27,10 @@ options.isabelle-rendering.code=new isabelle.jedit.Isabelle_Options2(); #actions +isabelle.increase-font-size.label=Increase font size +isabelle.increase-font-size.shortcut=C+PLUS +isabelle.decrease-font-size.label=Decrease font size +isabelle.decrease-font-size.shortcut=C+MINUS isabelle.check-buffer.label=Commence full proof checking of current buffer isabelle.check-buffer.shortcut=C+e SPACE isabelle.cancel-execution.label=Cancel current proof checking process diff -r b385d134926d -r 0c7b351a6871 src/Tools/jEdit/src/actions.xml --- a/src/Tools/jEdit/src/actions.xml Sun Nov 25 15:17:01 2012 +0100 +++ b/src/Tools/jEdit/src/actions.xml Sun Nov 25 17:15:21 2012 +0100 @@ -42,6 +42,16 @@ wm.addDockableWindow("isabelle-symbols"); + + + isabelle.jedit.Isabelle_Actions.increase_font_size(view); + + + + + isabelle.jedit.Isabelle_Actions.decrease_font_size(view); + + isabelle.jedit.Isabelle_Actions.check_buffer(buffer); diff -r b385d134926d -r 0c7b351a6871 src/Tools/jEdit/src/isabelle_actions.scala --- a/src/Tools/jEdit/src/isabelle_actions.scala Sun Nov 25 15:17:01 2012 +0100 +++ b/src/Tools/jEdit/src/isabelle_actions.scala Sun Nov 25 17:15:21 2012 +0100 @@ -9,12 +9,28 @@ import isabelle._ -import org.gjt.sp.jedit.Buffer +import org.gjt.sp.jedit.{jEdit, View, Buffer} import org.gjt.sp.jedit.textarea.JEditTextArea object Isabelle_Actions { + /* font size */ + + def change_font_size(view: View, change: Int => Int) + { + val FONT_SIZE = "view.fontsize" + val size = change(jEdit.getIntegerProperty(FONT_SIZE, 12)) max 5 + jEdit.setIntegerProperty(FONT_SIZE, size) + jEdit.propertiesChanged() + jEdit.saveSettings() + view.getStatus.setMessageAndClear("Text font size: " + size) + } + + def increase_font_size(view: View): Unit = change_font_size(view, i => i + ((i / 10) max 1)) + def decrease_font_size(view: View): Unit = change_font_size(view, i => i - ((i / 10) max 1)) + + /* full checking */ def check_buffer(buffer: Buffer)