UI整体重构
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user