add correct audio popup style
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
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.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,9 +508,11 @@ 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) {
|
||||||
return new RV32BufferFormat(sourceWidth, sourceHeight);
|
return new RV32BufferFormat(sourceWidth, sourceHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -22,10 +27,52 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,138 +9,172 @@
|
||||||
<?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"
|
||||||
<children>
|
prefWidth="1280.0" style="-fx-background-color: black;"
|
||||||
<HBox alignment="CENTER" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
xmlns="http://javafx.com/javafx/11.0.1"
|
||||||
<children>
|
xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<MediaView fx:id="mediaView" />
|
<children>
|
||||||
<ImageView fx:id="videoImageView" pickOnBounds="true" preserveRatio="true" />
|
<HBox alignment="CENTER" AnchorPane.bottomAnchor="0.0"
|
||||||
</children>
|
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
|
||||||
</HBox>
|
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>
|
<ImageView fx:id="videoImageView" pickOnBounds="true"
|
||||||
<JFXButton fx:id="btnBack" contentDisplay="GRAPHIC_ONLY" onAction="#btnBackAction">
|
preserveRatio="true" />
|
||||||
<graphic>
|
</children>
|
||||||
<ImageView fitHeight="24.0" pickOnBounds="true" preserveRatio="true">
|
</HBox>
|
||||||
<image>
|
<HBox fx:id="hBoxTop" alignment="CENTER_LEFT" spacing="10.0"
|
||||||
<Image url="@../icons/baseline_keyboard_backspace_white_48dp.png" />
|
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
|
||||||
</image></ImageView>
|
AnchorPane.topAnchor="0.0">
|
||||||
</graphic>
|
<children>
|
||||||
</JFXButton>
|
<JFXButton fx:id="btnBack" contentDisplay="GRAPHIC_ONLY"
|
||||||
<Label fx:id="lblTitle" text="Title" textFill="WHITE">
|
onAction="#btnBackAction">
|
||||||
<font>
|
<graphic>
|
||||||
<Font size="20.0" />
|
<ImageView fitHeight="24.0" pickOnBounds="true"
|
||||||
</font>
|
preserveRatio="true">
|
||||||
</Label>
|
<image>
|
||||||
</children>
|
<Image
|
||||||
<padding>
|
url="@../icons/baseline_keyboard_backspace_white_48dp.png" />
|
||||||
<Insets left="5.0" right="5.0" top="5.0" />
|
</image>
|
||||||
</padding>
|
</ImageView>
|
||||||
</HBox>
|
</graphic>
|
||||||
<VBox fx:id="bottomVBox" alignment="CENTER" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
|
</JFXButton>
|
||||||
<children>
|
<Label fx:id="lblTitle" text="Title" textFill="WHITE">
|
||||||
<HBox spacing="10.0">
|
<font>
|
||||||
<children>
|
<Font size="20.0" />
|
||||||
<JFXSlider fx:id="timeSlider" HBox.hgrow="ALWAYS">
|
</font>
|
||||||
<padding>
|
</Label>
|
||||||
<Insets left="5.0" right="5.0" />
|
</children>
|
||||||
</padding>
|
<padding>
|
||||||
</JFXSlider>
|
<Insets left="5.0" right="5.0" top="5.0" />
|
||||||
<Label fx:id="lblEndTime" text="0:00:00" textFill="WHITE">
|
</padding>
|
||||||
<font>
|
</HBox>
|
||||||
<Font size="17.0" />
|
<VBox fx:id="bottomVBox" alignment="CENTER"
|
||||||
</font></Label>
|
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||||
</children>
|
AnchorPane.rightAnchor="0.0">
|
||||||
<VBox.margin>
|
<children>
|
||||||
<Insets />
|
<HBox spacing="10.0">
|
||||||
</VBox.margin>
|
<children>
|
||||||
<padding>
|
<JFXSlider fx:id="timeSlider" HBox.hgrow="ALWAYS">
|
||||||
<Insets left="10.0" right="10.0" />
|
<padding>
|
||||||
</padding>
|
<Insets left="5.0" right="5.0" />
|
||||||
</HBox>
|
</padding>
|
||||||
<HBox fx:id="controlsHBox" spacing="10.0">
|
</JFXSlider>
|
||||||
<children>
|
<Label fx:id="lblEndTime" text="0:00:00" textFill="WHITE">
|
||||||
<HBox spacing="10.0">
|
<font>
|
||||||
<children>
|
<Font size="17.0" />
|
||||||
<JFXButton fx:id="btnPlay" contentDisplay="GRAPHIC_ONLY" onAction="#btnPlayAction">
|
</font>
|
||||||
<graphic>
|
</Label>
|
||||||
<ImageView fx:id="playIcon" fitHeight="42.0" pickOnBounds="true" preserveRatio="true">
|
</children>
|
||||||
<image>
|
<VBox.margin>
|
||||||
<Image url="@../icons/baseline_pause_white_48dp.png" />
|
<Insets />
|
||||||
</image>
|
</VBox.margin>
|
||||||
</ImageView>
|
<padding>
|
||||||
</graphic>
|
<Insets left="10.0" right="10.0" />
|
||||||
</JFXButton>
|
</padding>
|
||||||
<JFXButton fx:id="btnReplay" contentDisplay="GRAPHIC_ONLY" onAction="#btnReplayAction">
|
</HBox>
|
||||||
<graphic>
|
<HBox fx:id="controlsHBox" spacing="10.0">
|
||||||
<ImageView fitHeight="42.0" pickOnBounds="true" preserveRatio="true">
|
<children>
|
||||||
<image>
|
<HBox spacing="10.0">
|
||||||
<Image url="@../icons/baseline_replay_10_white_48dp.png" />
|
<children>
|
||||||
</image>
|
<JFXButton fx:id="btnPlay"
|
||||||
</ImageView>
|
contentDisplay="GRAPHIC_ONLY" onAction="#btnPlayAction">
|
||||||
</graphic>
|
<graphic>
|
||||||
</JFXButton>
|
<ImageView fx:id="playIcon" fitHeight="42.0"
|
||||||
<JFXButton fx:id="btnForward" contentDisplay="GRAPHIC_ONLY" onAction="#btnForwardAction">
|
pickOnBounds="true" preserveRatio="true">
|
||||||
<graphic>
|
<image>
|
||||||
<ImageView fitHeight="42.0" pickOnBounds="true" preserveRatio="true">
|
<Image url="@../icons/baseline_pause_white_48dp.png" />
|
||||||
<image>
|
</image>
|
||||||
<Image url="@../icons/baseline_forward_10_white_48dp.png" />
|
</ImageView>
|
||||||
</image>
|
</graphic>
|
||||||
</ImageView>
|
</JFXButton>
|
||||||
</graphic>
|
<JFXButton fx:id="btnReplay"
|
||||||
</JFXButton>
|
contentDisplay="GRAPHIC_ONLY" onAction="#btnReplayAction">
|
||||||
</children>
|
<graphic>
|
||||||
<padding>
|
<ImageView fitHeight="42.0" pickOnBounds="true"
|
||||||
<Insets left="5.0" right="5.0" />
|
preserveRatio="true">
|
||||||
</padding>
|
<image>
|
||||||
</HBox>
|
<Image
|
||||||
<HBox alignment="TOP_RIGHT" spacing="10.0" HBox.hgrow="ALWAYS">
|
url="@../icons/baseline_replay_10_white_48dp.png" />
|
||||||
<children>
|
</image>
|
||||||
<JFXButton fx:id="btnAudio" contentDisplay="GRAPHIC_ONLY" onAction="#btnAudioAction">
|
</ImageView>
|
||||||
<graphic>
|
</graphic>
|
||||||
<ImageView fitHeight="42.0" pickOnBounds="true" preserveRatio="true">
|
</JFXButton>
|
||||||
<image>
|
<JFXButton fx:id="btnForward"
|
||||||
<Image url="@../icons/baseline_subtitles_white_48dp.png" />
|
contentDisplay="GRAPHIC_ONLY" onAction="#btnForwardAction">
|
||||||
</image>
|
<graphic>
|
||||||
</ImageView>
|
<ImageView fitHeight="42.0" pickOnBounds="true"
|
||||||
</graphic>
|
preserveRatio="true">
|
||||||
</JFXButton>
|
<image>
|
||||||
<JFXButton fx:id="btnFullscreen" contentDisplay="GRAPHIC_ONLY" onAction="#btnFullscreenAction" prefHeight="39.0">
|
<Image
|
||||||
<graphic>
|
url="@../icons/baseline_forward_10_white_48dp.png" />
|
||||||
<ImageView fx:id="fullscreenIcon" fitHeight="42.0" pickOnBounds="true" preserveRatio="true">
|
</image>
|
||||||
<image>
|
</ImageView>
|
||||||
<Image url="@../icons/baseline_fullscreen_white_48dp.png" />
|
</graphic>
|
||||||
</image>
|
</JFXButton>
|
||||||
</ImageView>
|
</children>
|
||||||
</graphic>
|
<padding>
|
||||||
</JFXButton>
|
<Insets left="5.0" right="5.0" />
|
||||||
</children>
|
</padding>
|
||||||
<padding>
|
</HBox>
|
||||||
<Insets left="5.0" right="5.0" />
|
<HBox alignment="TOP_RIGHT" spacing="10.0"
|
||||||
</padding>
|
HBox.hgrow="ALWAYS">
|
||||||
</HBox>
|
<children>
|
||||||
</children>
|
<JFXButton fx:id="btnAudio"
|
||||||
<padding>
|
contentDisplay="GRAPHIC_ONLY" onAction="#btnAudioAction">
|
||||||
<Insets bottom="5.0" left="10.0" right="10.0" top="5.0" />
|
<graphic>
|
||||||
</padding>
|
<ImageView fitHeight="42.0" pickOnBounds="true"
|
||||||
</HBox>
|
preserveRatio="true">
|
||||||
</children>
|
<image>
|
||||||
<padding>
|
<Image
|
||||||
<Insets bottom="5.0" />
|
url="@../icons/baseline_subtitles_white_48dp.png" />
|
||||||
</padding>
|
</image>
|
||||||
</VBox>
|
</ImageView>
|
||||||
<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">
|
</graphic>
|
||||||
<font>
|
</JFXButton>
|
||||||
<Font name="System Bold" size="14.0" />
|
<JFXButton fx:id="btnFullscreen"
|
||||||
</font>
|
contentDisplay="GRAPHIC_ONLY" onAction="#btnFullscreenAction"
|
||||||
<opaqueInsets>
|
prefHeight="39.0">
|
||||||
<Insets />
|
<graphic>
|
||||||
</opaqueInsets>
|
<ImageView fx:id="fullscreenIcon" fitHeight="42.0"
|
||||||
<padding>
|
pickOnBounds="true" preserveRatio="true">
|
||||||
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
|
<image>
|
||||||
</padding></JFXButton>
|
<Image
|
||||||
</children>
|
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>
|
</AnchorPane>
|
||||||
|
|
Loading…
Reference in New Issue