Render thumbnails at correct aspect ratio
This commit is contained in:
@@ -7,10 +7,11 @@ component ImagePreview inherits Rectangle {
|
||||
in property <length> size: 32px;
|
||||
width: size;
|
||||
height: size;
|
||||
clip: true;
|
||||
|
||||
Image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: preview.ratio < 1.0 ? size : size * preview.ratio;
|
||||
height: preview.ratio > 1.0 ? size : size / preview.ratio;
|
||||
source: preview.image;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user