diff --git a/src/main/java/org/mosad/homeflix/player/PlayerController.java b/src/main/java/org/mosad/homeflix/player/PlayerController.java index 6c74399..25532ad 100644 --- a/src/main/java/org/mosad/homeflix/player/PlayerController.java +++ b/src/main/java/org/mosad/homeflix/player/PlayerController.java @@ -58,7 +58,7 @@ import javafx.scene.image.WritableImage; import javafx.scene.input.MouseEvent; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.HBox; -import javafx.scene.layout.Pane; +import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; import javafx.scene.media.MediaView; import javafx.scene.text.Text; @@ -74,6 +74,15 @@ import uk.co.caprica.vlcj.player.embedded.videosurface.callback.BufferFormatCall import uk.co.caprica.vlcj.player.embedded.videosurface.callback.RenderCallback; import uk.co.caprica.vlcj.player.embedded.videosurface.callback.format.RV32BufferFormat; +/** + * The PlayerController class is the main component of the HomeFlix Player. + * It uses vlcj to play videos and some modified jfoenix GUI components to + * create a Netflix like GUI. + * + * @author seil0 + * + * TODO this class needs heavy cleaning + */ public class PlayerController { @FXML private AnchorPane panePlayer; @@ -160,12 +169,7 @@ public class PlayerController { initPlayerWindow(); initMediaPlayer(); - initTimeSlider(); - - - Pane thumb = (Pane) timeSlider.lookup(".thumb"); - System.out.println(thumb.getChildren()); - + initTimeSlider(); } /** @@ -297,10 +301,20 @@ public class PlayerController { return null; } }; - timeSlider.setLabelFormatter(convert); + // get the animated thumb as StackPane + StackPane animatedThumb = (StackPane) timeSlider.lookup(".animated-thumb"); +// System.out.println(animatedThumb); +// System.out.println(animatedThumb.getChildren()); + + // modify the animated thumb + Text thumbText = (Text) animatedThumb.getChildren().get(0); + thumbText.setStyle("-fx-font-size: 15px; -fx-fill: white;"); + // TODO add a preview to the animated thumb, if that's possible +// ImageView iv = new ImageView(fullscreenExit); +// animatedThumb.getChildren().add(iv); } public void start() { diff --git a/src/main/resources/css/Player.css b/src/main/resources/css/Player.css index d4ba019..d8222a6 100644 --- a/src/main/resources/css/Player.css +++ b/src/main/resources/css/Player.css @@ -13,10 +13,19 @@ } */ +.jfx-slider > .colored-track { + -fx-background-color: #ee3523; +} + +.jfx-slider > .thumb { + -fx-background-color: #ee3523; +} + + .jfx-slider .animated-thumb{ -fx-rotate: 0; - -fx-pref-height: 30; - -fx-pref-width: 80; - -fx-background-color: #0F9D58; - -fx-background-radius: 50% 50% 50% 50%; + -fx-pref-height: 30px; + -fx-pref-width: 80px; + -fx-background-color: #303030; + -fx-background-radius: 5px 5px 5px 5px; } diff --git a/src/main/resources/fxml/SeriesDetailView.fxml b/src/main/resources/fxml/SeriesDetailView.fxml index 88b2a2b..0494754 100644 --- a/src/main/resources/fxml/SeriesDetailView.fxml +++ b/src/main/resources/fxml/SeriesDetailView.fxml @@ -61,7 +61,7 @@ - + @@ -70,11 +70,11 @@ -