src/Tools/jEdit/patches/icons
author wenzelm
Tue, 15 Apr 2025 21:32:50 +0200
changeset 82546 553aa1dd0feb
child 82548 afa1c2d485ae
permissions -rw-r--r--
support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
82546
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
     1
diff -ru jedit5.7.0/jEdit/ivy.xml jedit5.7.0-patched/jEdit/ivy.xml
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
     2
--- jedit5.7.0/jEdit/ivy.xml	2024-08-03 19:53:28.000000000 +0200
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
     3
+++ jedit5.7.0-patched/jEdit/ivy.xml	2025-04-15 20:19:53.730502085 +0200
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
     4
@@ -94,5 +94,7 @@
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
     5
 		<dependency org="com.google.code.findbugs" name="jsr305" rev="3.0.2"/>
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
     6
 
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
     7
 		<dependency org="com.evolvedbinary.appbundler" name="appbundler" rev="1.3.0" conf="appbundler"/>
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
     8
+
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
     9
+                <dependency org="com.formdev" name="flatlaf-extras" rev="3.6"/>
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    10
 	</dependencies>
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    11
 </ivy-module>
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    12
diff -ru jedit5.7.0/jEdit/org/gjt/sp/jedit/GUIUtilities.java jedit5.7.0-patched/jEdit/org/gjt/sp/jedit/GUIUtilities.java
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    13
--- jedit5.7.0/jEdit/org/gjt/sp/jedit/GUIUtilities.java	2024-08-03 19:53:15.000000000 +0200
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    14
+++ jedit5.7.0-patched/jEdit/org/gjt/sp/jedit/GUIUtilities.java	2025-04-15 20:32:22.232820353 +0200
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    15
@@ -72,6 +72,8 @@
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    16
 import java.util.concurrent.ScheduledExecutorService;
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    17
 import java.util.concurrent.TimeUnit;
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    18
 import java.util.concurrent.atomic.AtomicLong;
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    19
+
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    20
+import com.formdev.flatlaf.extras.FlatSVGIcon;
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    21
 //}}}
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    22
 
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    23
 /** Various GUI utility functions related to icons, menus, toolbars, keyboard shortcuts, etc.
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    24
@@ -164,7 +166,7 @@
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    25
 			}
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    26
 		}
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    27
 
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    28
-		icon = new ImageIcon(url);
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    29
+		icon = url.toString().endsWith(".svg") ? new FlatSVGIcon(url): new ImageIcon(url);
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    30
 
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    31
 		cache.put(iconName,icon);
553aa1dd0feb support for SVG icons via com.formdev.flatlaf.extras.FlatSVGIcon from flatlaf-extras (which is based on JSVG);
wenzelm
parents:
diff changeset
    32
 		return icon;