camera: fix image crop
This commit is contained in:
parent
ef5fd29612
commit
f14a357c9b
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ impl CameraContent {
|
||||||
ui.vertical_centered(|ui| {
|
ui.vertical_centered(|ui| {
|
||||||
egui::Image::from_texture(sized_image)
|
egui::Image::from_texture(sized_image)
|
||||||
// Setup to make image cropped at center of square.
|
// Setup to make image cropped at center of square.
|
||||||
.uv(Rect::from([Pos2::new(0.125, 0.0), Pos2::new(1.125, 1.0)]))
|
.uv(Rect::from([Pos2::new(0.25, 0.0), Pos2::new(1.0, 1.0)]))
|
||||||
.max_height(ui.available_width())
|
.max_height(ui.available_width())
|
||||||
.maintain_aspect_ratio(false)
|
.maintain_aspect_ratio(false)
|
||||||
.shrink_to_fit()
|
.shrink_to_fit()
|
||||||
|
|
Loading…
Reference in a new issue