UI整体重构

This commit is contained in:
张家训
2026-06-19 16:47:39 +08:00
parent 4c844159f3
commit 400a2bffc2
17 changed files with 1660 additions and 672 deletions
@@ -8,6 +8,7 @@ import com.example.workutils.system.plugin.VisualPluginFactory;
import com.example.workutils.system.support.JfxBootstrap;
import com.example.workutils.system.support.WinConsole;
import com.example.workutils.system.ui.MainWindow;
import com.example.workutils.system.ui.Theme;
import javafx.application.Platform;
import javafx.scene.Parent;
import javafx.scene.control.Alert;
@@ -24,6 +25,13 @@ import java.util.concurrent.CountDownLatch;
@Slf4j
public class WorkUtilsApplication implements CommandLineRunner {
static {
// 消除 JavaFX classpath 运行时的 WARNING: Unsupported JavaFX configuration
java.util.logging.Logger rootLogger = java.util.logging.Logger.getLogger("");
rootLogger.setFilter(record ->
!record.getMessage().contains("Unsupported JavaFX configuration"));
}
private final PluginManager pluginManager;
private final WorkUtilsProperties properties;
private final SettingsService settingsService;
@@ -66,6 +74,10 @@ public class WorkUtilsApplication implements CommandLineRunner {
return;
}
// 始终使用亮色主题
Theme.Mode mode = Theme.Mode.LIGHT;
Platform.runLater(() -> Theme.applyTheme(mode));
List<MainWindow.NavItem> navItems = buildNavItems();
CountDownLatch windowClosed = new CountDownLatch(1);