# HG changeset patch # User wenzelm # Date 1610218162 -3600 # Node ID b84887a67cc64219347f8248e714287f08b85d26 # Parent a8e5d7c9a83408fd87e8b0b4a96c7a0f747b0d07 clarified default L&F of Isabelle/Scala (not Isabelle/jEdit); diff -r a8e5d7c9a834 -r b84887a67cc6 NEWS --- a/NEWS Sat Jan 09 18:56:53 2021 +0100 +++ b/NEWS Sat Jan 09 19:49:22 2021 +0100 @@ -27,8 +27,9 @@ *** Isabelle/jEdit Prover IDE *** -* Improved GUI look-and-feel: the portable and scalable FlatLightLaf is -used by default on all platforms (appearance similar to IntelliJ IDEA). +* Improved GUI look-and-feel: the portable and scalable "FlatLaf Light" +is used by default on all platforms (appearance similar to IntelliJ +IDEA). * Improved markup for theory header imports: hyperlinks for theory files work without formal checking of content. @@ -344,6 +345,9 @@ file extensions. Minor INCOMPATIBILITY, e.g. see theory HOL-SPARK.SPARK_Setup to emulate the old behaviour. +* JVM system property "isabelle.laf" has been discontinued; the default +Swing look-and-feel is ""FlatLaf Light". + * Isabelle/Phabricator supports Ubuntu 20.04 LTS. * Isabelle/Phabricator setup has been updated to follow ongoing @@ -357,6 +361,8 @@ + + New in Isabelle2020 (April 2020) -------------------------------- diff -r a8e5d7c9a834 -r b84887a67cc6 src/Pure/GUI/gui.scala --- a/src/Pure/GUI/gui.scala Sat Jan 09 18:56:53 2021 +0100 +++ b/src/Pure/GUI/gui.scala Sat Jan 09 19:49:22 2021 +0100 @@ -18,34 +18,15 @@ object GUI { - /* Swing look-and-feels */ - - def find_laf(name: String): Option[String] = - UIManager.getInstalledLookAndFeels(). - find(c => c.getName == name || c.getClassName == name). - map(_.getClassName) + /* Swing look-and-feel */ - def get_laf(): String = - find_laf(System.getProperty("isabelle.laf")) getOrElse { - if (Platform.is_windows || Platform.is_macos) - UIManager.getSystemLookAndFeelClassName() - else - UIManager.getCrossPlatformLookAndFeelClassName() - } - - def init_laf(): Unit = UIManager.setLookAndFeel(get_laf()) + def init_laf(): Unit = com.formdev.flatlaf.FlatLightLaf.install() def current_laf(): String = UIManager.getLookAndFeel.getClass.getName() def is_macos_laf(): Boolean = Platform.is_macos && UIManager.getSystemLookAndFeelClassName() == current_laf() - def is_windows_laf(): Boolean = - Platform.is_windows && UIManager.getSystemLookAndFeelClassName() == current_laf() - - - /* additional look-and-feels */ - class Look_And_Feel(val laf: LookAndFeel) extends Isabelle_System.Service { def setup: Unit = UIManager.installLookAndFeel(laf.getName, laf.getClass.getName) @@ -57,6 +38,8 @@ def setup_lafs(): Unit = look_and_feels.foreach(_.setup) + /* additional look-and-feels */ + /* plain focus traversal, notably for text fields */ def plain_focus_traversal(component: Component)