--- a/src/Pure/GUI/gui.scala Tue Jan 05 20:53:57 2021 +0100
+++ b/src/Pure/GUI/gui.scala Tue Jan 05 21:46:35 2021 +0100
@@ -157,6 +157,21 @@
def isabelle_image(): Image = isabelle_icon().getImage
+ def isabelle_image_large(): Image =
+ Toolkit.getDefaultToolkit.getImage(
+ File.platform_path(Path.explode("~~/lib/logo/isabelle_transparent-128.png")))
+
+ def set_application_icon()
+ {
+ if (Platform.is_macos) {
+ val image = isabelle_image_large()
+ val app =
+ Class.forName("com.apple.eawt.Application")
+ .getDeclaredMethod("getApplication").invoke(null)
+ app.getClass.getDeclaredMethod("setDockIconImage", classOf[Image]).invoke(app, image)
+ }
+ }
+
/* location within multi-screen environment */