PageRenderTime 45ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-3-pre5/macros/Interface/Decrease_Font_Size.bsh

#
Unknown | 38 lines | 31 code | 7 blank | 0 comment | 0 complexity | 5bd685ca5ec4ff3cc6c8851d8fa84e74 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. /*
  2. * Decrease_Font_Size.bsh - a BeanShell macro for the jEdit text
  3. * editor - Decreases editor & gutter font size by 1.
  4. *
  5. * Copyright (C) 2003 Ollie Rutherfurd <oliver@rutherfurd.net>
  6. *
  7. * $Id: Decrease_Font_Size.bsh 4937 2003-12-22 04:14:55Z spestov $
  8. */
  9. decreaseFontSize()
  10. {
  11. FONT_SIZE = "view.fontsize";
  12. GUTTER_FONT_SIZE = "view.gutter.fontsize";
  13. CONSOLE_FONT_SIZE = "console.fontsize";
  14. size = jEdit.getIntegerProperty(FONT_SIZE,12) - 1;
  15. jEdit.setIntegerProperty(FONT_SIZE,size);
  16. jEdit.setIntegerProperty(GUTTER_FONT_SIZE,size);
  17. jEdit.setIntegerProperty(CONSOLE_FONT_SIZE,size);
  18. jEdit.propertiesChanged();
  19. jEdit.saveSettings();
  20. view.getStatus().setMessageAndClear("Font size now " + size);
  21. }
  22. decreaseFontSize();
  23. /*
  24. Macro index data (in DocBook format)
  25. <listitem>
  26. <para><filename>Decrease_Font_Size.bsh</filename></para>
  27. <abstract><para>
  28. Decreases the font size in the gutter and text area by 1 point.
  29. </para></abstract>
  30. </listitem>
  31. */