src/Pure/GUI/gui.scala
changeset 73116 b84887a67cc6
parent 73111 01f4965fd09b
child 73117 6a6e987552c7
--- 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)