forked from j62/ctbrec
Make recording indicator clickable
You can now click on the recording / pause indicator to pause or resume recording in the thubmnail overview tabs
This commit is contained in:
parent
80ea981644
commit
8df1ff72e7
|
@ -1,6 +1,13 @@
|
||||||
|
3.10.5
|
||||||
|
========================
|
||||||
|
* You can now click on the recording / pause indicator to pause or resume
|
||||||
|
recording in the thubmnail overview tabs
|
||||||
|
* Some smaller UI tweaks
|
||||||
|
|
||||||
3.10.4
|
3.10.4
|
||||||
========================
|
========================
|
||||||
* Fix: Bongacams login
|
* Fix: Bongacams login
|
||||||
|
* Fix: Minimal browser would freeze on windows
|
||||||
* Update minimal browser to Electron 10.1.5
|
* Update minimal browser to Electron 10.1.5
|
||||||
|
|
||||||
3.10.3
|
3.10.3
|
||||||
|
|
|
@ -1,18 +1,22 @@
|
||||||
package ctbrec.ui;
|
package ctbrec.ui;
|
||||||
|
|
||||||
import javafx.scene.layout.HBox;
|
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.scene.shape.Rectangle;
|
import javafx.scene.shape.Polygon;
|
||||||
|
|
||||||
public class PauseIndicator extends HBox {
|
public class PauseIndicator extends Polygon {
|
||||||
|
|
||||||
public PauseIndicator(Color c, int size) {
|
public PauseIndicator(Color color, int size) {
|
||||||
spacingProperty().setValue(size*1/5);
|
super(
|
||||||
Rectangle left = new Rectangle(size*2/5, size);
|
0, size,
|
||||||
left.setFill(c);
|
0, 0,
|
||||||
Rectangle right = new Rectangle(size*2/5, size);
|
(size * 2.0 / 5.0), 0,
|
||||||
right.setFill(c);
|
(size * 2.0 / 5.0), size,
|
||||||
getChildren().add(left);
|
(size * 3.0 / 5.0), size,
|
||||||
getChildren().add(right);
|
(size * 3.0 / 5.0), 0,
|
||||||
|
size, 0,
|
||||||
|
size, size
|
||||||
|
);
|
||||||
|
setFill(color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,12 +177,16 @@ public class ThumbCell extends StackPane {
|
||||||
|
|
||||||
recordingIndicator = new Circle(8);
|
recordingIndicator = new Circle(8);
|
||||||
recordingIndicator.setFill(colorRecording);
|
recordingIndicator.setFill(colorRecording);
|
||||||
|
recordingIndicator.setCursor(Cursor.HAND);
|
||||||
|
recordingIndicator.setOnMouseClicked(e -> pauseResumeAction(true));
|
||||||
StackPane.setMargin(recordingIndicator, new Insets(3));
|
StackPane.setMargin(recordingIndicator, new Insets(3));
|
||||||
StackPane.setAlignment(recordingIndicator, Pos.TOP_LEFT);
|
StackPane.setAlignment(recordingIndicator, Pos.TOP_LEFT);
|
||||||
getChildren().add(recordingIndicator);
|
getChildren().add(recordingIndicator);
|
||||||
|
|
||||||
pausedIndicator = new PauseIndicator(colorRecording, 16);
|
pausedIndicator = new PauseIndicator(colorRecording, 16);
|
||||||
pausedIndicator.setVisible(false);
|
pausedIndicator.setVisible(false);
|
||||||
|
pausedIndicator.setCursor(Cursor.HAND);
|
||||||
|
pausedIndicator.setOnMouseClicked(e -> pauseResumeAction(false));
|
||||||
StackPane.setMargin(pausedIndicator, new Insets(3));
|
StackPane.setMargin(pausedIndicator, new Insets(3));
|
||||||
StackPane.setAlignment(pausedIndicator, Pos.TOP_LEFT);
|
StackPane.setAlignment(pausedIndicator, Pos.TOP_LEFT);
|
||||||
getChildren().add(pausedIndicator);
|
getChildren().add(pausedIndicator);
|
||||||
|
|
Loading…
Reference in New Issue