add correct audio popup style
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jannik 2020-07-12 14:39:01 +02:00
parent e29bcc5da3
commit 257b09fc9c
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
3 changed files with 230 additions and 143 deletions

View File

@ -60,6 +60,7 @@ import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox; import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane; import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox; import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.text.Text; import javafx.scene.text.Text;
import javafx.util.StringConverter; import javafx.util.StringConverter;
import uk.co.caprica.vlcj.factory.MediaPlayerFactory; import uk.co.caprica.vlcj.factory.MediaPlayerFactory;
@ -438,9 +439,12 @@ public class PlayerController {
}); });
// TODO style the JFXListView // TODO style the JFXListView
Text heading = new Text("Audio");
heading.setFill(Color.WHITE);
JFXDialogLayout content = new JFXDialogLayout(); JFXDialogLayout content = new JFXDialogLayout();
content.setPrefSize(150, 200); content.setPrefSize(150, 200);
content.setHeading(new Text("Audio")); content.setHeading(heading);
content.setBody(list); content.setBody(list);
content.setPadding(new Insets(-20, -20, -20, -20)); // fix JFXDialogLayout padding content.setPadding(new Insets(-20, -20, -20, -20)); // fix JFXDialogLayout padding
content.setSpacing(-10); // fix JFXDialogLayout spacing content.setSpacing(-10); // fix JFXDialogLayout spacing
@ -504,6 +508,8 @@ public class PlayerController {
} }
private class FXBufferFormatCallback implements BufferFormatCallback { private class FXBufferFormatCallback implements BufferFormatCallback {
int sourceWidth;
int sourceHeight;
@Override @Override
public BufferFormat getBufferFormat(int sourceWidth, int sourceHeight) { public BufferFormat getBufferFormat(int sourceWidth, int sourceHeight) {

View File

@ -1,10 +1,15 @@
* {
-theme-secondary-dark: #303030;
}
/******************************************************************************* /*******************************************************************************
* * * *
* Slider * * Slider *
* * * *
******************************************************************************/ ******************************************************************************/
.jfx-slider .slider-value { .jfx-slider .slider-value {
-fx-rotate: 0; -fx-rotate: 0.0;
} }
/* /*
@ -23,9 +28,51 @@
.jfx-slider .animated-thumb { .jfx-slider .animated-thumb {
-fx-rotate: 0; -fx-rotate: 0.0;
-fx-pref-height: 30px; -fx-pref-height: 30.0px;
-fx-pref-width: 80px; -fx-pref-width: 80.0px;
-fx-background-color: #303030; -fx-background-color: -theme-secondary-dark;
-fx-background-radius: 5px 5px 5px 5px; -fx-background-radius: 5.0px 5.0px 5.0px 5.0px;
}
/*******************************************************************************
* *
* ListView *
* *
******************************************************************************/
.list-view {
-fx-background-color: -theme-secondary-dark;
-fx-padding: 1.0px;
}
.list-view .list-cell:hover {
-fx-background-color: #434343;
}
.list-view .list-cell:selected {
-fx-background-color: #434343;
}
.list-view .list-cell {
-fx-background-color: -theme-secondary-dark;
-fx-text-fill: white;
}
.list-view .label {
-fx-text-fill: white;
}
.jfx-rippler {
-jfx-rippler-fill: #ee3523;
}
/*******************************************************************************
* *
* Popup *
* *
******************************************************************************/
.jfx-popup-container {
-fx-background-color: -theme-secondary-dark;
} }

View File

@ -9,25 +9,35 @@
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.media.MediaView?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<AnchorPane fx:id="panePlayer" prefHeight="720.0" prefWidth="1280.0" style="-fx-background-color: black;" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"> <AnchorPane fx:id="panePlayer" prefHeight="720.0"
prefWidth="1280.0" style="-fx-background-color: black;"
xmlns="http://javafx.com/javafx/11.0.1"
xmlns:fx="http://javafx.com/fxml/1">
<children> <children>
<HBox alignment="CENTER" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <HBox alignment="CENTER" AnchorPane.bottomAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">
<children> <children>
<MediaView fx:id="mediaView" /> <ImageView fx:id="videoImageView" pickOnBounds="true"
<ImageView fx:id="videoImageView" pickOnBounds="true" preserveRatio="true" /> preserveRatio="true" />
</children> </children>
</HBox> </HBox>
<HBox fx:id="hBoxTop" alignment="CENTER_LEFT" spacing="10.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <HBox fx:id="hBoxTop" alignment="CENTER_LEFT" spacing="10.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">
<children> <children>
<JFXButton fx:id="btnBack" contentDisplay="GRAPHIC_ONLY" onAction="#btnBackAction"> <JFXButton fx:id="btnBack" contentDisplay="GRAPHIC_ONLY"
onAction="#btnBackAction">
<graphic> <graphic>
<ImageView fitHeight="24.0" pickOnBounds="true" preserveRatio="true"> <ImageView fitHeight="24.0" pickOnBounds="true"
preserveRatio="true">
<image> <image>
<Image url="@../icons/baseline_keyboard_backspace_white_48dp.png" /> <Image
</image></ImageView> url="@../icons/baseline_keyboard_backspace_white_48dp.png" />
</image>
</ImageView>
</graphic> </graphic>
</JFXButton> </JFXButton>
<Label fx:id="lblTitle" text="Title" textFill="WHITE"> <Label fx:id="lblTitle" text="Title" textFill="WHITE">
@ -40,7 +50,9 @@
<Insets left="5.0" right="5.0" top="5.0" /> <Insets left="5.0" right="5.0" top="5.0" />
</padding> </padding>
</HBox> </HBox>
<VBox fx:id="bottomVBox" alignment="CENTER" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"> <VBox fx:id="bottomVBox" alignment="CENTER"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0">
<children> <children>
<HBox spacing="10.0"> <HBox spacing="10.0">
<children> <children>
@ -52,7 +64,8 @@
<Label fx:id="lblEndTime" text="0:00:00" textFill="WHITE"> <Label fx:id="lblEndTime" text="0:00:00" textFill="WHITE">
<font> <font>
<Font size="17.0" /> <Font size="17.0" />
</font></Label> </font>
</Label>
</children> </children>
<VBox.margin> <VBox.margin>
<Insets /> <Insets />
@ -65,29 +78,37 @@
<children> <children>
<HBox spacing="10.0"> <HBox spacing="10.0">
<children> <children>
<JFXButton fx:id="btnPlay" contentDisplay="GRAPHIC_ONLY" onAction="#btnPlayAction"> <JFXButton fx:id="btnPlay"
contentDisplay="GRAPHIC_ONLY" onAction="#btnPlayAction">
<graphic> <graphic>
<ImageView fx:id="playIcon" fitHeight="42.0" pickOnBounds="true" preserveRatio="true"> <ImageView fx:id="playIcon" fitHeight="42.0"
pickOnBounds="true" preserveRatio="true">
<image> <image>
<Image url="@../icons/baseline_pause_white_48dp.png" /> <Image url="@../icons/baseline_pause_white_48dp.png" />
</image> </image>
</ImageView> </ImageView>
</graphic> </graphic>
</JFXButton> </JFXButton>
<JFXButton fx:id="btnReplay" contentDisplay="GRAPHIC_ONLY" onAction="#btnReplayAction"> <JFXButton fx:id="btnReplay"
contentDisplay="GRAPHIC_ONLY" onAction="#btnReplayAction">
<graphic> <graphic>
<ImageView fitHeight="42.0" pickOnBounds="true" preserveRatio="true"> <ImageView fitHeight="42.0" pickOnBounds="true"
preserveRatio="true">
<image> <image>
<Image url="@../icons/baseline_replay_10_white_48dp.png" /> <Image
url="@../icons/baseline_replay_10_white_48dp.png" />
</image> </image>
</ImageView> </ImageView>
</graphic> </graphic>
</JFXButton> </JFXButton>
<JFXButton fx:id="btnForward" contentDisplay="GRAPHIC_ONLY" onAction="#btnForwardAction"> <JFXButton fx:id="btnForward"
contentDisplay="GRAPHIC_ONLY" onAction="#btnForwardAction">
<graphic> <graphic>
<ImageView fitHeight="42.0" pickOnBounds="true" preserveRatio="true"> <ImageView fitHeight="42.0" pickOnBounds="true"
preserveRatio="true">
<image> <image>
<Image url="@../icons/baseline_forward_10_white_48dp.png" /> <Image
url="@../icons/baseline_forward_10_white_48dp.png" />
</image> </image>
</ImageView> </ImageView>
</graphic> </graphic>
@ -97,22 +118,30 @@
<Insets left="5.0" right="5.0" /> <Insets left="5.0" right="5.0" />
</padding> </padding>
</HBox> </HBox>
<HBox alignment="TOP_RIGHT" spacing="10.0" HBox.hgrow="ALWAYS"> <HBox alignment="TOP_RIGHT" spacing="10.0"
HBox.hgrow="ALWAYS">
<children> <children>
<JFXButton fx:id="btnAudio" contentDisplay="GRAPHIC_ONLY" onAction="#btnAudioAction"> <JFXButton fx:id="btnAudio"
contentDisplay="GRAPHIC_ONLY" onAction="#btnAudioAction">
<graphic> <graphic>
<ImageView fitHeight="42.0" pickOnBounds="true" preserveRatio="true"> <ImageView fitHeight="42.0" pickOnBounds="true"
preserveRatio="true">
<image> <image>
<Image url="@../icons/baseline_subtitles_white_48dp.png" /> <Image
url="@../icons/baseline_subtitles_white_48dp.png" />
</image> </image>
</ImageView> </ImageView>
</graphic> </graphic>
</JFXButton> </JFXButton>
<JFXButton fx:id="btnFullscreen" contentDisplay="GRAPHIC_ONLY" onAction="#btnFullscreenAction" prefHeight="39.0"> <JFXButton fx:id="btnFullscreen"
contentDisplay="GRAPHIC_ONLY" onAction="#btnFullscreenAction"
prefHeight="39.0">
<graphic> <graphic>
<ImageView fx:id="fullscreenIcon" fitHeight="42.0" pickOnBounds="true" preserveRatio="true"> <ImageView fx:id="fullscreenIcon" fitHeight="42.0"
pickOnBounds="true" preserveRatio="true">
<image> <image>
<Image url="@../icons/baseline_fullscreen_white_48dp.png" /> <Image
url="@../icons/baseline_fullscreen_white_48dp.png" />
</image> </image>
</ImageView> </ImageView>
</graphic> </graphic>
@ -132,7 +161,11 @@
<Insets bottom="5.0" /> <Insets bottom="5.0" />
</padding> </padding>
</VBox> </VBox>
<JFXButton fx:id="btnNextEpisode" onAction="#btnNextEpisodeAction" style="-fx-background-color: ee3523;" text="next episode in 10 seconds" textFill="WHITE" visible="false" AnchorPane.bottomAnchor="100.0" AnchorPane.rightAnchor="20.0"> <JFXButton fx:id="btnNextEpisode"
onAction="#btnNextEpisodeAction"
style="-fx-background-color: ee3523;"
text="next episode in 10 seconds" textFill="WHITE" visible="false"
AnchorPane.bottomAnchor="100.0" AnchorPane.rightAnchor="20.0">
<font> <font>
<Font name="System Bold" size="14.0" /> <Font name="System Bold" size="14.0" />
</font> </font>
@ -141,6 +174,7 @@
</opaqueInsets> </opaqueInsets>
<padding> <padding>
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" /> <Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
</padding></JFXButton> </padding>
</JFXButton>
</children> </children>
</AnchorPane> </AnchorPane>