feat(ui): 添加应用程序图标支持
为JavaFX桌面应用添加了多尺寸图标支持,提升了用户界面的专业性。移除了未实现的网络上报接口初始化注释。
This commit is contained in:
@@ -3,6 +3,7 @@ package com.fantaibao;
|
||||
import com.fantaibao.page.LoginView;
|
||||
import javafx.application.Application;
|
||||
import javafx.application.Platform;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.WindowEvent;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
@@ -24,7 +25,6 @@ public class DesktopApplication extends Application {
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
super.init();
|
||||
// todo 初始化应用程序网络上报接口
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -33,6 +33,9 @@ public class DesktopApplication extends Application {
|
||||
primaryStage.setTitle("中差评采集工具");
|
||||
// 添加窗口关闭事件监听器
|
||||
primaryStage.setOnCloseRequest(this::handleCloseEvent);
|
||||
// 添加多个尺寸的图标
|
||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon16.png")));
|
||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon32.png")));
|
||||
// 直接启动登录界面
|
||||
new LoginView(primaryStage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user