add button hover effect to player gui
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
* minor player gui fixes
This commit is contained in:
parent
5c4b78436f
commit
c323ac957c
2
pom.xml
2
pom.xml
|
@ -69,7 +69,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.xerial</groupId>
|
<groupId>org.xerial</groupId>
|
||||||
<artifactId>sqlite-jdbc</artifactId>
|
<artifactId>sqlite-jdbc</artifactId>
|
||||||
<version>3.31.1</version>
|
<version>3.32.3.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -228,6 +228,9 @@ public class PlayerController {
|
||||||
player.getStage().setFullScreen(!player.getStage().isFullScreen());
|
player.getStage().setFullScreen(!player.getStage().isFullScreen());
|
||||||
fullscreenIcon.setImage(player.getStage().isFullScreen() ? fullscreenExit : fullscreen);
|
fullscreenIcon.setImage(player.getStage().isFullScreen() ? fullscreenExit : fullscreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fix focused button has rippler fill https://github.com/jfoenixadmin/JFoenix/issues/1051
|
||||||
|
btnBack.setStyle("-jfx-rippler-fill: black;");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -289,13 +292,15 @@ public class PlayerController {
|
||||||
public void handle(MouseEvent event) {
|
public void handle(MouseEvent event) {
|
||||||
embeddedMediaPlayer.controls().skipTime(skipTime);
|
embeddedMediaPlayer.controls().skipTime(skipTime);
|
||||||
|
|
||||||
// TODO update time-stamps if video is paused
|
// update time-stamps if video is paused
|
||||||
// currentTime = currentTime + skipTime;
|
if (!embeddedMediaPlayer.status().isPlaying()) {
|
||||||
// endTime = endTime - skipTime;
|
Platform.runLater(() -> {
|
||||||
//
|
lblEndTime.setText(String.format("%d:%02d:%02d",
|
||||||
// Platform.runLater(() -> {
|
TimeUnit.MILLISECONDS.toHours(endTime - skipTime) % 24,
|
||||||
// updateControls();
|
TimeUnit.MILLISECONDS.toMinutes(endTime - skipTime) % 60,
|
||||||
// });
|
TimeUnit.MILLISECONDS.toSeconds(endTime - skipTime) % 60));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
mousePressed = false;
|
mousePressed = false;
|
||||||
}
|
}
|
||||||
|
@ -428,12 +433,30 @@ public class PlayerController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void btnReplayAction(ActionEvent event) {
|
void btnReplayAction(ActionEvent event) {
|
||||||
embeddedMediaPlayer.controls().skipTime(-10000);
|
embeddedMediaPlayer.controls().skipTime(-10000);
|
||||||
|
|
||||||
|
if (!embeddedMediaPlayer.status().isPlaying()) {
|
||||||
|
currentTime = currentTime - 10000;
|
||||||
|
endTime = endTime + 10000;
|
||||||
|
|
||||||
|
Platform.runLater(() -> {
|
||||||
|
updateControls();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void btnForwardAction(ActionEvent event) {
|
void btnForwardAction(ActionEvent event) {
|
||||||
embeddedMediaPlayer.controls().skipTime(10000);
|
embeddedMediaPlayer.controls().skipTime(10000);
|
||||||
|
|
||||||
|
if (!embeddedMediaPlayer.status().isPlaying()) {
|
||||||
|
currentTime = currentTime + 10000;
|
||||||
|
endTime = endTime - 10000;
|
||||||
|
|
||||||
|
Platform.runLater(() -> {
|
||||||
|
updateControls();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
|
@ -547,7 +570,4 @@ public class PlayerController {
|
||||||
Platform.runLater(() -> videoPixelBuffer.updateBuffer(pb -> null));
|
Platform.runLater(() -> videoPixelBuffer.updateBuffer(pb -> null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,3 +76,15 @@
|
||||||
.jfx-popup-container {
|
.jfx-popup-container {
|
||||||
-fx-background-color: -theme-secondary-dark;
|
-fx-background-color: -theme-secondary-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* *
|
||||||
|
* Button *
|
||||||
|
* *
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
.jfx-button:hover {
|
||||||
|
-fx-scale-x: 1.1;
|
||||||
|
-fx-scale-y: 1.1;
|
||||||
|
-fx-scale-z: 1.1;
|
||||||
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<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="32.0" pickOnBounds="true" preserveRatio="true">
|
||||||
<image>
|
<image>
|
||||||
<Image url="@../icons/baseline_keyboard_backspace_white_48dp.png" />
|
<Image url="@../icons/baseline_keyboard_backspace_white_48dp.png" />
|
||||||
</image>
|
</image>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
</JFXButton>
|
</JFXButton>
|
||||||
<Label fx:id="lblTitle" text="Title" textFill="WHITE">
|
<Label fx:id="lblTitle" text="Title" textFill="WHITE">
|
||||||
<font>
|
<font>
|
||||||
<Font size="20.0" />
|
<Font size="22.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
</children>
|
</children>
|
||||||
|
|
Loading…
Reference in New Issue