forked from j62/ctbrec
Set backbround of ThumbCell to lightgray
This commit is contained in:
parent
34f443c6a9
commit
e97b417480
|
@ -80,12 +80,12 @@ public class ThumbCell extends StackPane {
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.recorder = recorder;
|
this.recorder = recorder;
|
||||||
recording = recorder.isRecording(model);
|
recording = recorder.isRecording(model);
|
||||||
|
this.setStyle("-fx-background-color: lightgray");
|
||||||
|
|
||||||
iv = new ImageView();
|
iv = new ImageView();
|
||||||
setImage(model.getPreview());
|
|
||||||
iv.setSmooth(true);
|
iv.setSmooth(true);
|
||||||
iv.setPreserveRatio(true);
|
iv.setPreserveRatio(true);
|
||||||
iv.setStyle("-fx-background-color: #000");
|
setImage(model.getPreview());
|
||||||
getChildren().add(iv);
|
getChildren().add(iv);
|
||||||
|
|
||||||
nameBackground = new Rectangle();
|
nameBackground = new Rectangle();
|
||||||
|
@ -251,9 +251,9 @@ public class ThumbCell extends StackPane {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
|
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
|
||||||
if(newValue.doubleValue() == 1.0) {
|
if(newValue.doubleValue() == 1.0) {
|
||||||
imgAspectRatio = img.getHeight() / img.getWidth();
|
//imgAspectRatio = img.getHeight() / img.getWidth();
|
||||||
setThumbWidth(Config.getInstance().getSettings().thumbWidth);
|
|
||||||
iv.setImage(img);
|
iv.setImage(img);
|
||||||
|
setThumbWidth(Config.getInstance().getSettings().thumbWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -473,6 +473,7 @@ public class ThumbCell extends StackPane {
|
||||||
|
|
||||||
public void setThumbWidth(int width) {
|
public void setThumbWidth(int width) {
|
||||||
int height = (int) (width * imgAspectRatio);
|
int height = (int) (width * imgAspectRatio);
|
||||||
|
setPrefSize(width, height);
|
||||||
setSize(width, height);
|
setSize(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue