mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 08:50:52 +01:00
cache theme
This commit is contained in:
parent
e6b5507968
commit
73614f28be
@ -18,6 +18,7 @@ import javafx.scene.Scene;
|
|||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import javafx.stage.StageStyle;
|
import javafx.stage.StageStyle;
|
||||||
|
import sun.misc.Cache;
|
||||||
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
@ -109,6 +110,7 @@ public class GEarth extends Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setGearthTheme(Theme theme) {
|
private void setGearthTheme(Theme theme) {
|
||||||
|
Cacher.put("theme", theme.internalName());
|
||||||
themeObservable.fireEvent(t -> t.accept(theme));
|
themeObservable.fireEvent(t -> t.accept(theme));
|
||||||
GEarth.theme = theme;
|
GEarth.theme = theme;
|
||||||
Theme defaultTheme = ThemeFactory.getDefaultTheme();
|
Theme defaultTheme = ThemeFactory.getDefaultTheme();
|
||||||
|
Loading…
Reference in New Issue
Block a user