add correct audio popup style
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e29bcc5da3
commit
257b09fc9c
@ -60,6 +60,7 @@ import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.text.Text;
|
||||
import javafx.util.StringConverter;
|
||||
import uk.co.caprica.vlcj.factory.MediaPlayerFactory;
|
||||
@ -438,9 +439,12 @@ public class PlayerController {
|
||||
});
|
||||
// TODO style the JFXListView
|
||||
|
||||
Text heading = new Text("Audio");
|
||||
heading.setFill(Color.WHITE);
|
||||
|
||||
JFXDialogLayout content = new JFXDialogLayout();
|
||||
content.setPrefSize(150, 200);
|
||||
content.setHeading(new Text("Audio"));
|
||||
content.setHeading(heading);
|
||||
content.setBody(list);
|
||||
content.setPadding(new Insets(-20, -20, -20, -20)); // fix JFXDialogLayout padding
|
||||
content.setSpacing(-10); // fix JFXDialogLayout spacing
|
||||
@ -504,9 +508,11 @@ public class PlayerController {
|
||||
}
|
||||
|
||||
private class FXBufferFormatCallback implements BufferFormatCallback {
|
||||
|
||||
int sourceWidth;
|
||||
int sourceHeight;
|
||||
|
||||
@Override
|
||||
public BufferFormat getBufferFormat(int sourceWidth, int sourceHeight) {
|
||||
public BufferFormat getBufferFormat(int sourceWidth, int sourceHeight) {
|
||||
return new RV32BufferFormat(sourceWidth, sourceHeight);
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,15 @@
|
||||
* {
|
||||
-theme-secondary-dark: #303030;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* *
|
||||
* Slider *
|
||||
* *
|
||||
******************************************************************************/
|
||||
.jfx-slider .slider-value{
|
||||
-fx-rotate: 0;
|
||||
.jfx-slider .slider-value {
|
||||
-fx-rotate: 0.0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -22,10 +27,52 @@
|
||||
}
|
||||
|
||||
|
||||
.jfx-slider .animated-thumb{
|
||||
-fx-rotate: 0;
|
||||
-fx-pref-height: 30px;
|
||||
-fx-pref-width: 80px;
|
||||
-fx-background-color: #303030;
|
||||
-fx-background-radius: 5px 5px 5px 5px;
|
||||
.jfx-slider .animated-thumb {
|
||||
-fx-rotate: 0.0;
|
||||
-fx-pref-height: 30.0px;
|
||||
-fx-pref-width: 80.0px;
|
||||
-fx-background-color: -theme-secondary-dark;
|
||||
-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;
|
||||
}
|
||||
|
@ -9,138 +9,172 @@
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.media.MediaView?>
|
||||
<?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">
|
||||
<children>
|
||||
<HBox alignment="CENTER" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<MediaView fx:id="mediaView" />
|
||||
<ImageView fx:id="videoImageView" pickOnBounds="true" preserveRatio="true" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox fx:id="hBoxTop" alignment="CENTER_LEFT" spacing="10.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<JFXButton fx:id="btnBack" contentDisplay="GRAPHIC_ONLY" onAction="#btnBackAction">
|
||||
<graphic>
|
||||
<ImageView fitHeight="24.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../icons/baseline_keyboard_backspace_white_48dp.png" />
|
||||
</image></ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
<Label fx:id="lblTitle" text="Title" textFill="WHITE">
|
||||
<font>
|
||||
<Font size="20.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets left="5.0" right="5.0" top="5.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
<VBox fx:id="bottomVBox" alignment="CENTER" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
|
||||
<children>
|
||||
<HBox spacing="10.0">
|
||||
<children>
|
||||
<JFXSlider fx:id="timeSlider" HBox.hgrow="ALWAYS">
|
||||
<padding>
|
||||
<Insets left="5.0" right="5.0" />
|
||||
</padding>
|
||||
</JFXSlider>
|
||||
<Label fx:id="lblEndTime" text="0:00:00" textFill="WHITE">
|
||||
<font>
|
||||
<Font size="17.0" />
|
||||
</font></Label>
|
||||
</children>
|
||||
<VBox.margin>
|
||||
<Insets />
|
||||
</VBox.margin>
|
||||
<padding>
|
||||
<Insets left="10.0" right="10.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
<HBox fx:id="controlsHBox" spacing="10.0">
|
||||
<children>
|
||||
<HBox spacing="10.0">
|
||||
<children>
|
||||
<JFXButton fx:id="btnPlay" contentDisplay="GRAPHIC_ONLY" onAction="#btnPlayAction">
|
||||
<graphic>
|
||||
<ImageView fx:id="playIcon" fitHeight="42.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../icons/baseline_pause_white_48dp.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
<JFXButton fx:id="btnReplay" contentDisplay="GRAPHIC_ONLY" onAction="#btnReplayAction">
|
||||
<graphic>
|
||||
<ImageView fitHeight="42.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../icons/baseline_replay_10_white_48dp.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
<JFXButton fx:id="btnForward" contentDisplay="GRAPHIC_ONLY" onAction="#btnForwardAction">
|
||||
<graphic>
|
||||
<ImageView fitHeight="42.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../icons/baseline_forward_10_white_48dp.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets left="5.0" right="5.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
<HBox alignment="TOP_RIGHT" spacing="10.0" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<JFXButton fx:id="btnAudio" contentDisplay="GRAPHIC_ONLY" onAction="#btnAudioAction">
|
||||
<graphic>
|
||||
<ImageView fitHeight="42.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../icons/baseline_subtitles_white_48dp.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
<JFXButton fx:id="btnFullscreen" contentDisplay="GRAPHIC_ONLY" onAction="#btnFullscreenAction" prefHeight="39.0">
|
||||
<graphic>
|
||||
<ImageView fx:id="fullscreenIcon" fitHeight="42.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../icons/baseline_fullscreen_white_48dp.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets left="5.0" right="5.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="10.0" right="10.0" top="5.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="5.0" />
|
||||
</padding>
|
||||
</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">
|
||||
<font>
|
||||
<Font name="System Bold" size="14.0" />
|
||||
</font>
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
<padding>
|
||||
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
|
||||
</padding></JFXButton>
|
||||
</children>
|
||||
<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>
|
||||
<HBox alignment="CENTER" AnchorPane.bottomAnchor="0.0"
|
||||
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
|
||||
AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<ImageView fx:id="videoImageView" pickOnBounds="true"
|
||||
preserveRatio="true" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox fx:id="hBoxTop" alignment="CENTER_LEFT" spacing="10.0"
|
||||
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
|
||||
AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<JFXButton fx:id="btnBack" contentDisplay="GRAPHIC_ONLY"
|
||||
onAction="#btnBackAction">
|
||||
<graphic>
|
||||
<ImageView fitHeight="24.0" pickOnBounds="true"
|
||||
preserveRatio="true">
|
||||
<image>
|
||||
<Image
|
||||
url="@../icons/baseline_keyboard_backspace_white_48dp.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
<Label fx:id="lblTitle" text="Title" textFill="WHITE">
|
||||
<font>
|
||||
<Font size="20.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets left="5.0" right="5.0" top="5.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
<VBox fx:id="bottomVBox" alignment="CENTER"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0">
|
||||
<children>
|
||||
<HBox spacing="10.0">
|
||||
<children>
|
||||
<JFXSlider fx:id="timeSlider" HBox.hgrow="ALWAYS">
|
||||
<padding>
|
||||
<Insets left="5.0" right="5.0" />
|
||||
</padding>
|
||||
</JFXSlider>
|
||||
<Label fx:id="lblEndTime" text="0:00:00" textFill="WHITE">
|
||||
<font>
|
||||
<Font size="17.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</children>
|
||||
<VBox.margin>
|
||||
<Insets />
|
||||
</VBox.margin>
|
||||
<padding>
|
||||
<Insets left="10.0" right="10.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
<HBox fx:id="controlsHBox" spacing="10.0">
|
||||
<children>
|
||||
<HBox spacing="10.0">
|
||||
<children>
|
||||
<JFXButton fx:id="btnPlay"
|
||||
contentDisplay="GRAPHIC_ONLY" onAction="#btnPlayAction">
|
||||
<graphic>
|
||||
<ImageView fx:id="playIcon" fitHeight="42.0"
|
||||
pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../icons/baseline_pause_white_48dp.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
<JFXButton fx:id="btnReplay"
|
||||
contentDisplay="GRAPHIC_ONLY" onAction="#btnReplayAction">
|
||||
<graphic>
|
||||
<ImageView fitHeight="42.0" pickOnBounds="true"
|
||||
preserveRatio="true">
|
||||
<image>
|
||||
<Image
|
||||
url="@../icons/baseline_replay_10_white_48dp.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
<JFXButton fx:id="btnForward"
|
||||
contentDisplay="GRAPHIC_ONLY" onAction="#btnForwardAction">
|
||||
<graphic>
|
||||
<ImageView fitHeight="42.0" pickOnBounds="true"
|
||||
preserveRatio="true">
|
||||
<image>
|
||||
<Image
|
||||
url="@../icons/baseline_forward_10_white_48dp.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets left="5.0" right="5.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
<HBox alignment="TOP_RIGHT" spacing="10.0"
|
||||
HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<JFXButton fx:id="btnAudio"
|
||||
contentDisplay="GRAPHIC_ONLY" onAction="#btnAudioAction">
|
||||
<graphic>
|
||||
<ImageView fitHeight="42.0" pickOnBounds="true"
|
||||
preserveRatio="true">
|
||||
<image>
|
||||
<Image
|
||||
url="@../icons/baseline_subtitles_white_48dp.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
<JFXButton fx:id="btnFullscreen"
|
||||
contentDisplay="GRAPHIC_ONLY" onAction="#btnFullscreenAction"
|
||||
prefHeight="39.0">
|
||||
<graphic>
|
||||
<ImageView fx:id="fullscreenIcon" fitHeight="42.0"
|
||||
pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image
|
||||
url="@../icons/baseline_fullscreen_white_48dp.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</JFXButton>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets left="5.0" right="5.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="10.0" right="10.0" top="5.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="5.0" />
|
||||
</padding>
|
||||
</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">
|
||||
<font>
|
||||
<Font name="System Bold" size="14.0" />
|
||||
</font>
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
<padding>
|
||||
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
|
||||
</padding>
|
||||
</JFXButton>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
|
Loading…
Reference in New Issue
Block a user