Enable scene anti-aliasing
This commit is contained in:
parent
836012f8c0
commit
1d06ac5a5d
@ -21,8 +21,10 @@ import java.nio.file.Paths;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
|
import javafx.application.ConditionalFeature;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
|
import javafx.scene.SceneAntialiasing;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.input.KeyCode;
|
import javafx.scene.input.KeyCode;
|
||||||
import javafx.scene.input.KeyCodeCombination;
|
import javafx.scene.input.KeyCodeCombination;
|
||||||
@ -54,7 +56,11 @@ public class Launcher extends Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var root = new ApplicationWindow();
|
var root = new ApplicationWindow();
|
||||||
var scene = new Scene(root, 1200, 768);
|
|
||||||
|
var antialiasing = Platform.isSupported(ConditionalFeature.SCENE3D)
|
||||||
|
? SceneAntialiasing.BALANCED
|
||||||
|
: SceneAntialiasing.DISABLED;
|
||||||
|
var scene = new Scene(root, 1200, 768, false, antialiasing);
|
||||||
scene.setOnKeyPressed(this::dispatchHotkeys);
|
scene.setOnKeyPressed(this::dispatchHotkeys);
|
||||||
|
|
||||||
var tm = ThemeManager.getInstance();
|
var tm = ThemeManager.getInstance();
|
||||||
|
Loading…
Reference in New Issue
Block a user