Fix rounded corners for portrait images
This commit is contained in:
parent
56ca4d50de
commit
6d17b0413c
|
@ -17,7 +17,6 @@ public class ImageTableCell extends ClickableTableCell<Image> {
|
|||
imageView.prefHeight(64);
|
||||
imageView.setFitHeight(64);
|
||||
|
||||
|
||||
setPadding(new Insets(5));
|
||||
setGraphic(imageView);
|
||||
}
|
||||
|
@ -29,7 +28,7 @@ public class ImageTableCell extends ClickableTableCell<Image> {
|
|||
double columnWidth = getTableColumn().getWidth();
|
||||
Insets pd = getPadding();
|
||||
var height = columnWidth - pd.getTop() - pd.getBottom();
|
||||
var width = columnWidth - pd.getLeft() - pd.getRight() - 3;
|
||||
var width = columnWidth - pd.getLeft() - pd.getRight();
|
||||
imageView.prefHeight(height);
|
||||
imageView.setFitHeight(height);
|
||||
imageView.prefWidth(width);
|
||||
|
@ -37,7 +36,7 @@ public class ImageTableCell extends ClickableTableCell<Image> {
|
|||
|
||||
var clip = new Rectangle(width, height);
|
||||
clip.setArcHeight(10);
|
||||
clip.arcWidthProperty().bind(clip.arcHeightProperty());
|
||||
clip.setArcWidth(10);
|
||||
imageView.setClip(clip);
|
||||
}
|
||||
super.requestLayout();
|
||||
|
|
Loading…
Reference in New Issue