Skip to content

Commit 4eaf4ef

Browse files
committed
1.移除多余插件图标
1 parent 0111613 commit 4eaf4ef

9 files changed

Lines changed: 1 addition & 46 deletions

File tree

src/main/java/com/xwintop/xJavaFxTool/model/PluginJarInfo.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ public File getFile() {
8080
return localPath == null? new File("libs/", getJarName() + "-" + getVersion() + ".jar"): new File(localPath);
8181
}
8282

83-
@JSONField(serialize = false)
84-
public String getDefaultIconPath() {
85-
return bundleName == null ? "" : (bundleName.replace("locale.", "/logo/") + ".png");
86-
}
87-
8883
@JSONField(serialize = false)
8984
private Image iconImage;
9085
}

src/main/java/com/xwintop/xJavaFxTool/newui/PluginItemController.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.xwintop.xJavaFxTool.controller.IndexController;
44
import com.xwintop.xJavaFxTool.model.PluginJarInfo;
55
import com.xwintop.xJavaFxTool.plugin.PluginManager;
6-
import com.xwintop.xJavaFxTool.utils.ResourceUtils;
76
import com.xwintop.xcore.javafx.helper.FxmlHelper;
87
import javafx.fxml.FXMLLoader;
98
import javafx.scene.control.CheckMenuItem;
@@ -17,8 +16,6 @@
1716
import lombok.Data;
1817
import lombok.extern.slf4j.Slf4j;
1918

20-
import java.net.URL;
21-
2219
@Data
2320
@Slf4j
2421
public class PluginItemController {
@@ -77,14 +74,7 @@ private void updateIcon() {
7774
if (this.pluginJarInfo.getIconImage() != null) {
7875
imgLogo.setImage(this.pluginJarInfo.getIconImage());
7976
} else {
80-
URL iconUrl = ResourceUtils.getResource(this.pluginJarInfo.getIconPath(), this.pluginJarInfo.getDefaultIconPath(), "/logo/plugin.png");
81-
if (iconUrl != null) {
82-
String url = iconUrl.toExternalForm();
83-
if (url.endsWith("plugin.png")) {
84-
log.info("please add logo to " + this.pluginJarInfo.getDefaultIconPath());
85-
}
86-
imgLogo.setImage(new Image(url));
87-
}
77+
imgLogo.setImage(new Image("/images/plugin.png"));
8878
}
8979
}
9080

src/main/java/com/xwintop/xJavaFxTool/utils/ResourceUtils.java

Lines changed: 0 additions & 30 deletions
This file was deleted.
-922 Bytes
Binary file not shown.
-1.21 KB
Binary file not shown.
-2.14 KB
Binary file not shown.
-2.19 KB
Binary file not shown.
-1.19 KB
Binary file not shown.

0 commit comments

Comments
 (0)