GraxCode / threadtear

Multifunctional java deobfuscation tool suite
GNU General Public License v3.0
889 stars 121 forks source link

Make 'graph.svg' and 'graph_disabled.svg' themed icons. #29

Closed weisJ closed 4 years ago

weisJ commented 4 years ago

Make 'graph.svg' and 'graph_disabled.svg' themed icons:

Ignore IntelliJ project files:

Avoid unnecessarily keeping the loading indicator running:

weisJ commented 4 years ago

I have also simplified the color definitions of all other icons.

GraxCode commented 4 years ago

This somehow broke the icon loader: com.kitfox.svg.SVGException: java.lang.IllegalArgumentException: User must specify at least 2 colors

weisJ commented 4 years ago

What is the complete stacktrace?

GraxCode commented 4 years ago
java.lang.IllegalArgumentException: User must specify at least 2 colors

    at java.awt.MultipleGradientPaint.<init>(MultipleGradientPaint.java:169)
    at java.awt.LinearGradientPaint.<init>(LinearGradientPaint.java:286)
    at com.kitfox.svg.LinearGradient.getPaint(LinearGradient.java:157)
    at com.kitfox.svg.ShapeElement.renderShape(ShapeElement.java:167)
    ... 84 more
GraxCode commented 4 years ago
java.lang.IllegalArgumentException: User must specify at least 2 colors

    at com.kitfox.svg.Path.render(Path.java:94)
    at com.kitfox.svg.Group.render(Group.java:205)
    at com.kitfox.svg.SVGRoot.render(SVGRoot.java:335)
    at com.kitfox.svg.SVGRoot.renderToViewport(SVGRoot.java:266)
    at com.kitfox.svg.SVGDiagram.render(SVGDiagram.java:111)
    at com.kitfox.svg.app.beans.SVGIcon.paintIcon(SVGIcon.java:322)
weisJ commented 4 years ago

Can you print getSvgURI().toASCIIString() for the SVGIcon that throws the exception?

Btw, does this happen by simply starting the application? If yes reimporting the gradle project should fix the issue.

gradlew build --refresh-dependencies
GraxCode commented 4 years ago

This happens while loading the tree. I'm pretty sure it is the package icon, as jar files with no packages work. Folders as in the execution tree or all other icons seem to work.

weisJ commented 4 years ago

Replace

pack = Utils.getIcon("package.svg");

with

pack = Utils.getIcon("package.svg", true);

in ClassTreeCellRenderer:22

GraxCode commented 4 years ago

It works now, thanks. Will write if something else is not working.