cache theme

This commit is contained in:
sirjonasxx 2022-02-16 01:34:16 +01:00
parent e6b5507968
commit 73614f28be

View File

@ -18,6 +18,7 @@ import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import sun.misc.Cache;
import java.util.function.Consumer;
@ -109,6 +110,7 @@ public class GEarth extends Application {
}
private void setGearthTheme(Theme theme) {
Cacher.put("theme", theme.internalName());
themeObservable.fireEvent(t -> t.accept(theme));
GEarth.theme = theme;
Theme defaultTheme = ThemeFactory.getDefaultTheme();