Add small comment to the image docs regarding image-fit and aspect ratio

This commit is contained in:
Simon Hausmann 2021-04-15 08:28:22 +02:00
parent ed888664f9
commit dc12a22780

View file

@ -138,6 +138,7 @@ Example := Window {
VerticalLayout {
Image {
source: @image-url("https://sixtyfps.io/resources/logo_scaled.png");
// image-fit default is `contain` when in layout, preserving aspect ratio
}
Image {
source: @image-url("https://sixtyfps.io/resources/logo_scaled.png");
@ -154,7 +155,7 @@ Example := Window {
Image {
source: @image-url("https://sixtyfps.io/resources/logo_scaled.png");
width: 270px;
// implicit default: height: self.width * natural_height / natural_width;
// implicit default, preserving aspect ratio: height: self.width * natural_height / natural_width;
}
}
```