Skip to content
Snippets Groups Projects
Commit 03e1cbc3 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Fixed Media View Bug

parent b260ec38
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@ import de.tobias.utils.application.container.PathType;
import de.tobias.utils.util.OS;
import de.tobias.utils.util.OS.OSType;
import javafx.application.Platform;
import javafx.event.Event;
import javafx.geometry.Pos;
import javafx.geometry.Rectangle2D;
import javafx.scene.Scene;
......@@ -45,7 +46,7 @@ public class MediaViewController implements ProfileListener {
private Pad currentDisplayedPad;
public MediaViewController(VideoSettings settings) {
MediaViewController(VideoSettings settings) {
Profile.registerListener(this);
this.settings = settings;
......@@ -80,11 +81,12 @@ public class MediaViewController implements ProfileListener {
if (OS.getType() == OSType.Windows)
stage.setAlwaysOnTop(true);
getStage().setOnCloseRequest(event -> event.consume());
getStage().setOnCloseRequest(Event::consume);
reloadSettings();
}
public void reloadSettings() {
void reloadSettings() {
Platform.runLater(() -> {
if (stage.isFullScreen())
stage.setFullScreen(false);
......@@ -111,9 +113,10 @@ public class MediaViewController implements ProfileListener {
if (settings.isFullScreen() && !stage.isFullScreen())
stage.setFullScreen(true);
});
}
public Stage getStage() {
Stage getStage() {
return stage;
}
......@@ -145,7 +148,7 @@ public class MediaViewController implements ProfileListener {
@Override
public void reloadSettings(Profile old, Profile currentProfile) {
Platform.runLater(() -> reloadSettings());
Platform.runLater(this::reloadSettings);
}
public boolean isFinish() {
......@@ -176,7 +179,7 @@ public class MediaViewController implements ProfileListener {
return currentDisplayedPad;
}
public void blind(boolean blind) {
void blind(boolean blind) {
if (blind) {
this.imageView.setStyle("");
mediaView.setMediaPlayer(null);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment