fix SeriesDetailView, improved the timesliders animated thumb
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jannik 2020-07-10 16:38:19 +02:00
parent d210655dcf
commit fb390e3169
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
3 changed files with 40 additions and 17 deletions

View File

@ -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;
@ -161,11 +170,6 @@ public class PlayerController {
initPlayerWindow();
initMediaPlayer();
initTimeSlider();
Pane thumb = (Pane) timeSlider.lookup(".thumb");
System.out.println(thumb.getChildren());
}
/**
@ -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() {

View File

@ -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;
}

View File

@ -61,7 +61,7 @@
</graphic></JFXButton>
</children>
</HBox>
<TextFlow layoutX="22.0" layoutY="150.0" lineSpacing="1.0" maxHeight="-Infinity" prefHeight="130.0" prefWidth="808.0" AnchorPane.leftAnchor="22.0" AnchorPane.rightAnchor="310.0" AnchorPane.topAnchor="130.0">
<TextFlow layoutX="22.0" layoutY="150.0" lineSpacing="1.0" maxHeight="-Infinity" prefHeight="130.0" prefWidth="808.0" AnchorPane.bottomAnchor="308.0" AnchorPane.leftAnchor="22.0" AnchorPane.rightAnchor="310.0" AnchorPane.topAnchor="130.0">
<children>
<Text fx:id="textPlot" fill="#ecebed" strokeType="OUTSIDE" strokeWidth="0.0" text="Avatar: Der Herr der Elemente ist eine amerikanische Zeichentrickserie. Die Serie wurde erstellt und produziert von Michael Dante DiMartion und Bryan Konietzko. Avatar spielt in einer, stark asiatisch beeinflussten Welt, in der einige in der Lage sind die Elemente zu beeinflussen. Die Fähigkeit die Elemente zu &quot;bändigen&quot;, erfolgt in einer Mischung aus mentaler Beeinflussung und einer Variation von fernöstlicher Kampfkunst.Die Serie erzählt die Geschichte des zwölfjährigen Aangs und seinen Freunden, die versuchen das Gleichgewicht der Elemente wieder herzustellen, indem sie die Herrschaft des Feuerlords über die drei anderen Elemente beenden. Aang ist der letzte verbliebene Luftbändiger und gleichzeitig der Avatar, welcher 100 Jahre verschollen war.">
<font>
@ -70,11 +70,11 @@
</Text>
</children>
</TextFlow>
<Label fx:id="lblCrew" layoutX="31.0" layoutY="346.0" text="Haupt-Crew" textFill="#ecebed" AnchorPane.leftAnchor="22.0" AnchorPane.topAnchor="280.0">
<Label fx:id="lblCrew" layoutX="31.0" layoutY="346.0" text="Haupt-Crew" textFill="#ecebed" AnchorPane.bottomAnchor="264.0" AnchorPane.leftAnchor="22.0">
<font>
<Font size="20.0" />
</font></Label>
<HBox layoutX="22.0" layoutY="372.0" spacing="30.0" AnchorPane.leftAnchor="22.0" AnchorPane.rightAnchor="310.0" AnchorPane.topAnchor="310.0">
<HBox layoutX="22.0" layoutY="372.0" spacing="30.0" AnchorPane.bottomAnchor="218.0" AnchorPane.leftAnchor="22.0" AnchorPane.rightAnchor="310.0">
<children>
<VBox spacing="3.0">
<children>
@ -118,7 +118,7 @@
</VBox>
</children>
</HBox>
<ScrollPane fx:id="scrollPaneEpisodes" layoutX="22.0" layoutY="398.0" prefHeight="135.0" style="-fx-background-color: #595959;" AnchorPane.leftAnchor="22.0" AnchorPane.rightAnchor="310.0" AnchorPane.topAnchor="370.0">
<ScrollPane fx:id="scrollPaneEpisodes" layoutX="22.0" layoutY="398.0" prefHeight="135.0" style="-fx-background-color: #595959;" AnchorPane.bottomAnchor="63.0" AnchorPane.leftAnchor="22.0" AnchorPane.rightAnchor="310.0">
<content>
<HBox fx:id="hBoxEpisodes" maxHeight="-Infinity" minHeight="-Infinity" prefHeight="117.0" spacing="10.0">
<padding>
@ -127,7 +127,7 @@
</HBox>
</content>
</ScrollPane>
<HBox style="-fx-background-color: #ffffff;" AnchorPane.leftAnchor="22.0" AnchorPane.topAnchor="515.0">
<HBox style="-fx-background-color: #ffffff;" AnchorPane.bottomAnchor="28.0" AnchorPane.leftAnchor="22.0">
<children>
<ChoiceBox fx:id="cbSeason" prefHeight="25.0" prefWidth="168.0" />
</children>